mirror of
https://github.com/arkenfox/user.js.git
synced 2025-05-03 23:43:40 +02:00
Update updater.sh
now you can use SCRIPT_DIR in update_updater instead of $currdir because $currdir could be anything
This commit is contained in:
parent
8a2d5891fe
commit
3fe46385cd
1 changed files with 10 additions and 6 deletions
16
updater.sh
16
updater.sh
|
@ -6,7 +6,14 @@
|
||||||
## Author: Pat Johnson (@overdodactyl)
|
## Author: Pat Johnson (@overdodactyl)
|
||||||
## Additional contributors: @earthlng, @ema-pe
|
## Additional contributors: @earthlng, @ema-pe
|
||||||
|
|
||||||
## DON'T GO HIGHER THAN VERSION x.9 !! ( because of ASCII comparison in check_for_update() )
|
## DON'T GO HIGHER THAN VERSION x.9 !! ( because of ASCII comparison in update_updater() )
|
||||||
|
|
||||||
|
readonly currdir=$(pwd)
|
||||||
|
|
||||||
|
sfp=$(readlink -f "${BASH_SOURCE[0]}" 2>/dev/null || greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null)
|
||||||
|
if [ -z "$sfp" ]; then sfp=${BASH_SOURCE[0]}; fi
|
||||||
|
readonly SCRIPT_DIR="$(dirname "${sfp}")"
|
||||||
|
|
||||||
|
|
||||||
#########################
|
#########################
|
||||||
# Base variables #
|
# Base variables #
|
||||||
|
@ -36,11 +43,8 @@ PROFILE_PATH=false
|
||||||
#########################
|
#########################
|
||||||
|
|
||||||
set_wd () {
|
set_wd () {
|
||||||
currdir=$(pwd)
|
|
||||||
if [ "$PROFILE_PATH" = false ]; then
|
if [ "$PROFILE_PATH" = false ]; then
|
||||||
sfp=$(readlink -f "${BASH_SOURCE[0]}" 2>/dev/null || greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null)
|
ff_profile="$SCRIPT_DIR"
|
||||||
if [ -z "$sfp" ]; then sfp=${BASH_SOURCE[0]}; fi
|
|
||||||
ff_profile="$(dirname "${sfp}")"
|
|
||||||
elif [ "$PROFILE_PATH" = "list" ]; then
|
elif [ "$PROFILE_PATH" = "list" ]; then
|
||||||
if [ "$(uname)" == "Darwin" ]; then
|
if [ "$(uname)" == "Darwin" ]; then
|
||||||
firefox_dir=~/Library/Application\ Support/Firefox/Profiles/
|
firefox_dir=~/Library/Application\ Support/Firefox/Profiles/
|
||||||
|
@ -59,7 +63,7 @@ set_wd () {
|
||||||
else
|
else
|
||||||
ff_profile="$PROFILE_PATH"
|
ff_profile="$PROFILE_PATH"
|
||||||
fi
|
fi
|
||||||
cd "$ff_profile"
|
cd "$ff_profile"
|
||||||
}
|
}
|
||||||
|
|
||||||
#########################
|
#########################
|
||||||
|
|
Loading…
Add table
Reference in a new issue