commit: 96cd66ac1bdadc0eefca6d63eb01e814690dba52
parent: 40a2a92a1fdd4109399d32301ce950a19f2b7d84
Author: kaniini <ariadne@dereferenced.org>
Date: Fri, 25 Oct 2019 00:24:01 +0000
Merge branch 'fix/pleroma-ctl-fix-shift-dash' into 'develop'
pleroma_ctl: fix crashes due to different shift(1) behavior on dash
See merge request pleroma/pleroma!1880
Diffstat:
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/rel/files/bin/pleroma_ctl b/rel/files/bin/pleroma_ctl
@@ -140,11 +140,15 @@ else
FULL_ARGS="$*"
ACTION="$1"
- shift
- echo "$1" | grep "^-" >/dev/null
+ if [ $# -gt 0 ]; then
+ shift
+ fi
+ echo "$1" | grep "^-" >/dev/null
if [ $? -eq 1 ]; then
SUBACTION="$1"
- shift
+ if [ $# -gt 0 ]; then
+ shift
+ fi
fi
if [ "$ACTION" = "update" ]; then