瀏覽代碼

Update updater.sh

earthlng 7 年之前
父節點
當前提交
41a55ad5f2
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      updater.sh

+ 2 - 2
updater.sh

@@ -10,8 +10,8 @@ echo -e "\nThis script should be run from your Firefox profile directory.\n"
 
 currdir=$(pwd)
 
-## get the full path of this script (readlink for Linux)
-scriptfullpath=$(readlink -f "${BASH_SOURCE[0]}" 2>/dev/null || "${BASH_SOURCE[0]}")
+## get the full path of this script (readlink for Linux, greadlink for Mac with coreutils installed, fallback otherwise)
+scriptfullpath=$(readlink -f "${BASH_SOURCE[0]}" 2>/dev/null || greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || "${BASH_SOURCE[0]}")
 
 ## change directory to the Firefox profile directory
 cd "$(dirname "${scriptfullpath}")"