projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b26d16
)
pleroma_ctl: fix crashes due to different shift(1) behavior on dash
author
rinpatch
<rinpatch@sdf.org>
Thu, 24 Oct 2019 20:28:59 +0000
(23:28 +0300)
committer
rinpatch
<rinpatch@sdf.org>
Fri, 25 Oct 2019 15:32:09 +0000
(18:32 +0300)
rel/files/bin/pleroma_ctl
patch
|
blob
|
history
diff --git
a/rel/files/bin/pleroma_ctl
b/rel/files/bin/pleroma_ctl
index 9fc5b0bad8a0a64ec2ea9ace3887ff79ca95028c..87c486514008b84086e308efee4f7774cc85afad 100755
(executable)
--- 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