aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-07-01 18:13:20 +1200
committerTom Ryder <tom@sanctum.geek.nz>2017-07-01 18:13:20 +1200
commita2e6c142769658ae48458c3b4c5dfd9cd00be87a (patch)
treeec86599da7841e272b531d7cf16fb46de9792ffd
parentSolve Pandoc issue by not building page at all (diff)
downloaddotfiles-a2e6c142769658ae48458c3b4c5dfd9cd00be87a.tar.gz
dotfiles-a2e6c142769658ae48458c3b4c5dfd9cd00be87a.zip
Work around no options terminal in POSIX chmod(1)
-rw-r--r--bin/mex.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/mex.sh b/bin/mex.sh
index 0b3d6c7e..cf4e07e7 100644
--- a/bin/mex.sh
+++ b/bin/mex.sh
@@ -37,7 +37,11 @@ for name ; do
# If the "found" variable was defined to something, we'll try to change its
# permissions
if [ -n "$found" ] ; then
- chmod +x -- "$found" || ex=1
+ case $found in
+ /*) ;;
+ *) found=$PWD/$found ;;
+ esac
+ chmod +x "$found" || ex=1
# If not, we'll report that we couldn't find it, and flag an error for the
# exit status