Procházet zdrojové kódy

Quote variables and backticks

Otherwise the script fails with spaces or asterisks in the directory path.
Jan Verbeek před 9 roky
rodič
revize
42debcfe3c
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1
    1
      manage.sh

+ 1
- 1
manage.sh Zobrazit soubor

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