Browse Source

Quote variables and backticks

Otherwise the script fails with spaces or asterisks in the directory path.
Jan Verbeek 8 years ago
parent
commit
42debcfe3c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      manage.sh

+ 1 - 1
manage.sh

@@ -1,6 +1,6 @@
 #!/bin/sh
 #!/bin/sh
 
 
-BASE_DIR=$(dirname `readlink -f $0`)
+BASE_DIR=$(dirname "`readlink -f "$0"`")
 PYTHONPATH=$BASE_DIR
 PYTHONPATH=$BASE_DIR
 SEARX_DIR="$BASE_DIR/searx"
 SEARX_DIR="$BASE_DIR/searx"
 ACTION=$1
 ACTION=$1