diff options
author | kaniini <ariadne@dereferenced.org> | 2019-10-25 00:24:01 +0000 |
---|---|---|
committer | kaniini <ariadne@dereferenced.org> | 2019-10-25 00:24:01 +0000 |
commit | 96cd66ac1bdadc0eefca6d63eb01e814690dba52 (patch) | |
tree | d4ff9a1443ac8d96d3482e63302a79ab35f14718 /rel | |
parent | 40a2a92a1fdd4109399d32301ce950a19f2b7d84 (diff) | |
parent | f3451e723bbc1adb879908532525d54dba1b601a (diff) | |
download | pleroma-96cd66ac1bdadc0eefca6d63eb01e814690dba52.tar.gz |
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 (limited to 'rel')
-rwxr-xr-x | rel/files/bin/pleroma_ctl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/rel/files/bin/pleroma_ctl b/rel/files/bin/pleroma_ctl index 9fc5b0bad..87c486514 100755 --- 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 |