aboutsummaryrefslogtreecommitdiffstats
path: root/kerl
diff options
context:
space:
mode:
Diffstat (limited to 'kerl')
-rwxr-xr-xkerl35
1 files changed, 20 insertions, 15 deletions
diff --git a/kerl b/kerl
index 6acdcb4..e561866 100755
--- a/kerl
+++ b/kerl
@@ -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"