Skip to content

Commit

Permalink
updater.sh - next attempt
Browse files Browse the repository at this point in the history
... at fixing the script path detection. should hopefully fix arkenfox/user.js#264 (comment)
  • Loading branch information
earthlng authored Nov 25, 2017
1 parent 05b42e8 commit 0aca3d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions updater.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

### ghacks-user.js updater for Mac/Linux
## author: @overdodactyl
## version: 1.1
## version: 1.2

ghacksjs="https://raw.githubusercontent.com/ghacksuserjs/ghacks-user.js/master/user.js"

echo -e "\nThis script should be run from your Firefox profile directory.\n"

currdir=$(pwd)

## get the full path of this script (greadlink for Mac, readlink for Linux)
scriptfullpath=$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BASH_SOURCE[0]}")
## get the full path of this script (readlink for Linux)
scriptfullpath=$(readlink -f "${BASH_SOURCE[0]}" 2>/dev/null || "${BASH_SOURCE[0]}")

## change directory to the Firefox profile directory
cd "$(dirname "${scriptfullpath}")"
Expand Down

0 comments on commit 0aca3d7

Please sign in to comment.