user.js

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 679ca592334e2e50247b9a8c50083d790ec6682b
parent 41a55ad5f2a4e29a36754d7d35588e30cb52a85e
Author: earthlng <earthlng@users.noreply.github.com>
Date:   Sat, 25 Nov 2017 18:56:49 +0100

Update updater.sh
Diffstat:
Mupdater.sh | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/updater.sh b/updater.sh @@ -10,11 +10,14 @@ 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, 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]}") +## get the full path of this script (readlink for Linux, greadlink for Mac with coreutils installed) +sfp=$(readlink -f "${BASH_SOURCE[0]}" 2>/dev/null || greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null) + +## fallback for Macs without coreutils +if [ -z "$sfp" ]; then sfp=${BASH_SOURCE[0]}; fi ## change directory to the Firefox profile directory -cd "$(dirname "${scriptfullpath}")" +cd "$(dirname "${sfp}")" echo -e "Updating the user.js for Firefox profile:\n$(pwd)\n"