X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=rel%2Ffiles%2Fbin%2Fpleroma_ctl;h=87c486514008b84086e308efee4f7774cc85afad;hb=7ac5f210ea386b9c0e75626a71fd01c6ef9d4408;hp=f767fe134d9a6d8f9b760b94e0ee6f50dfb0a75c;hpb=44afe4c8870d14ae2cd22ff5cfa04555cf5907bd;p=akkoma diff --git a/rel/files/bin/pleroma_ctl b/rel/files/bin/pleroma_ctl index f767fe134..87c486514 100755 --- a/rel/files/bin/pleroma_ctl +++ b/rel/files/bin/pleroma_ctl @@ -35,11 +35,11 @@ detect_branch() { if [ "$branch" = "develop" ]; then echo "develop" elif [ "$branch" = "" ]; then - echo "master" + echo "stable" else # Note: branch name in version is of SemVer format and may only contain [0-9a-zA-Z-] symbols — # if supporting releases for more branches, need to ensure they contain only these symbols. - echo "Releases are built only for master and develop branches" >&2 + echo "Can't detect the branch automatically, please specify it by using the --branch option." >&2 exit 1 fi } @@ -140,12 +140,16 @@ else FULL_ARGS="$*" ACTION="$1" - shift - - if [ "$(echo \"$1\" | grep \"^-\" >/dev/null)" = false ]; then - SUBACTION="$1" + if [ $# -gt 0 ]; then shift fi + echo "$1" | grep "^-" >/dev/null + if [ $? -eq 1 ]; then + SUBACTION="$1" + if [ $# -gt 0 ]; then + shift + fi + fi if [ "$ACTION" = "update" ]; then update "$@"