summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@colm.net>2020-04-14 11:09:09 +0000
committerAdrian Thurston <thurston@colm.net>2020-04-14 11:09:09 +0000
commitd7e5936812368ab8aba80c9d848cbc23861a555e (patch)
treef040be54d3998a7ddc543a4b24e813d7db573ae7 /src
parent008a9b04edb9447d575f384637461bfcd2ea16e7 (diff)
downloadcolm-d7e5936812368ab8aba80c9d848cbc23861a555e.tar.gz
allow colm-command (-w) to be a full path
Don't try and compute the path to the command when it is already specified.
Diffstat (limited to 'src')
-rw-r--r--src/colm-wrap.sh10
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"