Allow test to be used against other executables

This commit is contained in:
Nero 2018-03-20 18:02:58 +00:00
parent 49d87e3c40
commit d54039a09b
1 changed files with 8 additions and 3 deletions

11
test.sh
View File

@ -1,7 +1,12 @@
#!/bin/sh
bin=$PWD/realpath.sh
ref="readlink -f"
#ref="busybox readlink -f"
# Give in the command to test against as argument(s)
# Examples: ./test.sh readlink -f
# ./test.sh cat
# ./test.sh ./otherscript.sh
bin="$@"
[ -z "$bin" ] && bin=$PWD/realpath.sh
dir="$(mktemp -d)"
cd "$dir"