urchin/tests/Cross-shell testing/.test-run-by-specified-shell/With -s, a sh test should be invoked with sh.
2016-02-29 12:34:44 +00:00

11 lines
232 B
Bash
Executable File

#!/bin/sh
# This script should run with /bin/sh
# regardless of whether -s or -n is passed.
this_shell=$(ps -o pid,comm | sed -n "s/^ *$$//p" | cut -d\ -f2)
echo "Running shell: $this_shell"
test $(basename "$this_shell") = sh