Browse Source

Start script now works for all relative paths ensuring runtipi is the current working directory.

dextreem 2 năm trước cách đây
mục cha
commit
eb08dd4021
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      scripts/start.sh

+ 1 - 1
scripts/start.sh

@@ -75,7 +75,7 @@ while [ -n "$1" ]; do # while loop starts
 done
 
 # Ensure BASH_SOURCE is ./scripts/start.sh
-if [[ "${BASH_SOURCE[0]}" != "./scripts/start.sh" ]]; then
+if [[ $(basename $(pwd)) != "runtipi" ]] || [[ ! -f "${BASH_SOURCE[0]}" ]]; then
   echo "Please make sure this script is executed from runtipi/"
   exit 1
 fi