use POSIX caseā€„esac master
authormirabilos <m@mirbsd.org>
Sun, 17 May 2020 22:05:14 +0000 (00:05 +0200)
committermirabilos <mirabilos@evolvis.org>
Sun, 17 May 2020 22:05:14 +0000 (00:05 +0200)
debian/joe-jupp.postinst
debian/joe-jupp.prerm
debian/jupp.postinst
debian/jupp.postrm
debian/jupp.preinst
debian/jupp.prerm

index 345b3d7..c73e0ef 100644 (file)
@@ -26,7 +26,7 @@ set -e
 # Treat this as just like "configure" for a future extension by debconf.
 
 case $1 in
-configure|reconfigure)
+(configure|reconfigure)
        for whatall in jstar:98 joe:97 jpico:96 jmacs:95; do
                whateditor=${whatall%:*}
                whatlevel=${whatall##*:}
@@ -42,13 +42,13 @@ configure|reconfigure)
            /usr/share/man/man1/jpico.1.gz
        ;;
 
-abort-upgrade|abort-remove|abort-deconfigure)
+(abort-upgrade|abort-remove|abort-deconfigure)
        ;;
 
-triggered)
+(triggered)
        ;;
 
-*)
+(*)
        echo >&2 "E: postinst called with unknown subcommand '$1'"
        exit 1
        ;;
index c7835e4..99e56d0 100644 (file)
@@ -19,17 +19,17 @@ set -e
 # other constraints the same as above.
 
 case $1 in
-remove|deconfigure)
+(remove|deconfigure)
        for x in jmacs jpico joe jstar; do
                update-alternatives --remove editor /usr/bin/$x
        done
        update-alternatives --remove pico /usr/bin/jpico
        ;;
 
-upgrade|failed-upgrade)
+(upgrade|failed-upgrade)
        ;;
 
-*)
+(*)
        echo >&2 "E: prerm called with unknown subcommand '$1'"
        exit 1
        ;;
index 05aba3e..1699603 100644 (file)
@@ -26,7 +26,7 @@ set -e
 # Treat this as just like "configure" for a future extension by debconf.
 
 case $1 in
-configure|reconfigure)
+(configure|reconfigure)
        update-alternatives --install /usr/bin/editor editor /usr/bin/jupp 99 \
            --slave /var/lib/misc/editorrc editorrc /etc/jupp/jupprc \
            --slave /usr/share/man/man1/editor.1.gz editor.1.gz \
@@ -39,13 +39,13 @@ configure|reconfigure)
        fi
        ;;
 
-abort-upgrade|abort-remove|abort-deconfigure)
+(abort-upgrade|abort-remove|abort-deconfigure)
        ;;
 
-triggered)
+(triggered)
        ;;
 
-*)
+(*)
        echo >&2 "E: postinst called with unknown subcommand '$1'"
        exit 1
        ;;
index d3e7d9e..be2033d 100644 (file)
@@ -25,17 +25,17 @@ set -e
 # and (unpacked or Half-Configured) Pre-Depends are available.
 
 case $1 in
-remove)
+(remove)
        ;;
 
-purge)
+(purge)
        rm -rf /etc/jupp
        ;;
 
-upgrade|disappear|failed-upgrade|abort-install|abort-upgrade)
+(upgrade|disappear|failed-upgrade|abort-install|abort-upgrade)
        ;;
 
-*)
+(*)
        echo >&2 "E: postrm called with unknown subcommand '$1'"
        exit 1
        ;;
index c8f00fc..3b6cf3a 100644 (file)
@@ -14,7 +14,7 @@ set -e
 # or, for "abort-upgrade", Half-Installed if their upgrade failed.
 
 case $1 in
-install|upgrade)
+(install|upgrade)
        # drop old editorrc (master alternative and symlink file both)
        if test -z "$2" || \
            dpkg --compare-versions "$2" lt '3.1.18-2~'; then
@@ -24,10 +24,10 @@ install|upgrade)
        fi
        ;;
 
-abort-upgrade)
+(abort-upgrade)
        ;;
 
-*)
+(*)
        echo >&2 "E: preinst called with unknown subcommand '$1'"
        exit 1
        ;;
index 466bb78..417613a 100644 (file)
@@ -19,14 +19,14 @@ set -e
 # other constraints the same as above.
 
 case $1 in
-remove|deconfigure)
+(remove|deconfigure)
        update-alternatives --remove editor /usr/bin/jupp
        ;;
 
-upgrade|failed-upgrade)
+(upgrade|failed-upgrade)
        ;;
 
-*)
+(*)
        echo >&2 "E: prerm called with unknown subcommand '$1'"
        exit 1
        ;;