pleroma_ctl: fix crashes due to different shift(1) behavior on dash

This commit is contained in:
rinpatch 2019-10-24 23:28:59 +03:00
parent 07a6f8b8a3
commit f3451e723b

View file

@ -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