pleroma_ctl: fix == instead of = and double quote the path to prevent globing
authorrinpatch <rinpatch@sdf.org>
Thu, 13 Jun 2019 19:16:57 +0000 (22:16 +0300)
committerrinpatch <rinpatch@sdf.org>
Thu, 13 Jun 2019 19:16:57 +0000 (22:16 +0300)
rel/pleroma_ctl

index ef2717c44cb1ab8a4a6f8104cc372c0be7b71501..2e709a8a67c34ecc3e855d2ec37fb1420dbffc05 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 # XXX: This should be removed when elixir's releases get custom command support
-if [ -z "$1" ] || [ "$1" == "help" ]; then
+if [ -z "$1" ] || [ "$1" = "help" ]; then
   echo "Usage: $(basename "$0") COMMAND [ARGS]
 
     The known commands are:
@@ -15,5 +15,5 @@ if [ -z "$1" ] || [ "$1" == "help" ]; then
 else
   SCRIPT=$(readlink -f "$0")
   SCRIPTPATH=$(dirname "$SCRIPT")
-  $SCRIPTPATH/pleroma eval 'Pleroma.ReleaseTasks.run("'"$*"'")'
+  "$SCRIPTPATH"/pleroma eval 'Pleroma.ReleaseTasks.run("'"$*"'")'
 fi