• Bug#265884: cream: bashism in /usr/bin/cream

    From Gergely Nagy@1:229/2 to All on Sun Aug 15 17:00:13 2004
    From: [email protected]

    Package: cream
    Version: 0.29-3
    Severity: normal
    Tags: patch

    /usr/bin/cream uses [ foo == bar ] and [ foobar -a baz ] constructs,
    which are bashisms. Using = instead of ==, and [ foobar ] && [ baz ]
    instead of the other solves the problem.

    A patch that does just this is attached.


    --- cream.orig 2004-08-15 16:36:10.000000000 +0200
    +++ cream 2004-08-15 16:36:49.000000000 +0200
    @@ -10,10 +10,10 @@
    export CREAM

    # If this script is called as 'gcream' then try to run gvim
    -if [ $(basename $0) == "gcream" -a -x /usr/bin/gvim -a "$DISPLAY" != "" ] ; then
    +if [ $(basename $0) = "gcream" ] && [ -x /usr/bin/gvim ] && [ "$DISPLAY" != "" ] ; then
    exec /usr/bin/gvim -U NONE -u "\$VIM/cream/creamrc" "$@"
    # If this script is called as 'kcream' then try to run kvim
    -elif [ $(basename $0) == "kcream" -a -x /usr/bin/kvim -a "$DISPLAY" != "" ] ; then
    +elif [ $(basename $0) = "kcream" ] && [ -x /usr/bin/kvim ] && [ "$DISPLAY" != "" ] ; then
    exec /usr/bin/kvim -U NONE -u "\$VIM/cream/creamrc" "$@"
    # ...otherwise try 'vim' (e.g. on a console)
    else

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)