Don't use bashisms for finding the script directory

Posix sh and $0 should be good enough in most cases.
This commit is contained in:
Martin Storsjö committed 2018-05-07 09:49:48 +03:00
1 parent ce282cdf5d
commit fa08e722ed
1 file changed
+2 -2
+2 -2
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
#!/bin/sh
DIR="$(cd "$(dirname "$0")" && pwd)"
TARGET="$(basename $0 | sed 's/-[^-]*$//')"
EXE=$(basename $0 | sed 's/.*-\([^-]*\)/\1/')
case $EXE in