Pārlūkot izejas kodu

Quote variables and backticks

Otherwise the script fails with spaces or asterisks in the directory path.
Jan Verbeek 8 gadus atpakaļ
vecāks
revīzija
42debcfe3c
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1
    1
      manage.sh

+ 1
- 1
manage.sh Parādīt failu

@@ -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