diff options
-rw-r--r-- | src/colm-wrap.sh | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/colm-wrap.sh b/src/colm-wrap.sh index 8140afca..b2c9dbac 100644 --- a/src/colm-wrap.sh +++ b/src/colm-wrap.sh @@ -61,10 +61,14 @@ if [ "${INPUT%.pack}" != "$INPUT" ]; then EXIT_STATUS=$? else CMD=${CMD:=colm} - if [ "`basename $0`" != "$0" ] && [ -x "`dirname $0`/$CMD" ]; then - COLM="`dirname $0`/$CMD" + if [ "`basename $CMD`" != "$CMD" ]; then + COLM=$CMD else - COLM=@prefix@/bin/$CMD + if [ "`basename $0`" != "$0" ] && [ -x "`dirname $0`/$CMD" ]; then + COLM="`dirname $0`/$CMD" + else + COLM=@prefix@/bin/$CMD + fi fi $COLM $ARGS "$INPUT" |