diff options
author | Pierre Fenoll <[email protected]> | 2018-04-05 14:16:24 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2018-04-05 14:16:24 +0200 |
commit | bf2562ba1ea13d65fe499ad28c56be5a275828fa (patch) | |
tree | 526ee40818f98d4a4d30413ff84445e59a491218 /kerl | |
parent | 0c17b5801cd91b44d1a1a9fe0ec75c62812cf4b5 (diff) | |
download | kerl-bf2562ba1ea13d65fe499ad28c56be5a275828fa.tar.gz kerl-bf2562ba1ea13d65fe499ad28c56be5a275828fa.tar.bz2 kerl-bf2562ba1ea13d65fe499ad28c56be5a275828fa.zip |
Alpine support (#269)
* work around restricted/different coreutils
* alpine: have CI test alpine
Diffstat (limited to 'kerl')
-rwxr-xr-x | kerl | 35 |
1 files changed, 20 insertions, 15 deletions
@@ -1083,21 +1083,26 @@ ACTIVATE_CSH build_plt "$absdir" fi - PID=$$ - PARENT_PID=$(ps -p $PID -o ppid=) || exit 1 - # shellcheck disable=SC2086 - PARENT_CMD=$(ps -p $PARENT_PID -o ucomm | tail -n 1) - case "$PARENT_CMD" in - fish) - SHELL_SUFFIX='.fish' - ;; - csh) - SHELL_SUFFIX='.csh' - ;; - *) - SHELL_SUFFIX='' - ;; - esac + if which apk >/dev/null 2>&1; then + # Running on Alpine Linux, assuming non-exotic shell + SHELL_SUFFIX='' + else + PID=$$ + PARENT_PID=$(ps -p $PID -o ppid=) || exit 1 + # shellcheck disable=SC2086 + PARENT_CMD=$(ps -p $PARENT_PID -o ucomm | tail -n 1) + case "$PARENT_CMD" in + fish) + SHELL_SUFFIX='.fish' + ;; + csh) + SHELL_SUFFIX='.csh' + ;; + *) + SHELL_SUFFIX='' + ;; + esac + fi echo 'You can activate this installation running the following command:' echo ". $absdir/activate$SHELL_SUFFIX" |