mirror of
https://github.com/arkenfox/user.js.git
synced 2025-04-22 00:19:28 -04:00
updater.sh: -n overrides -o
This commit is contained in:
parent
4e8291d2c7
commit
36192205a3
14
updater.sh
14
updater.sh
@ -2,7 +2,7 @@
|
||||
|
||||
## ghacks-user.js updater for macOS and Linux
|
||||
|
||||
## version: 1.6
|
||||
## version: 2.0
|
||||
## Author: Pat Johnson (@overdodactyl)
|
||||
## Additional contributors: @earthlng, @ema-pe
|
||||
|
||||
@ -75,6 +75,7 @@ CONFIRM="yes"
|
||||
OVERRIDE="user-overrides.js"
|
||||
BACKUP="multiple"
|
||||
COMPARE=false
|
||||
SKIPOVERRIDE=false
|
||||
|
||||
if [ $# != 0 ]; then
|
||||
legacy_lc="$(echo $1 | tr '[A-Z]' '[a-z]')"
|
||||
@ -103,7 +104,7 @@ if [ $# != 0 ]; then
|
||||
CONFIRM="no"
|
||||
;;
|
||||
n)
|
||||
OVERRIDE="none"
|
||||
SKIPOVERRIDE=true
|
||||
;;
|
||||
o)
|
||||
OVERRIDE=${OPTARG}
|
||||
@ -309,11 +310,12 @@ update_userjs () {
|
||||
cp user.js userjs_diffs/past_user.js
|
||||
fi
|
||||
backup_file user.js
|
||||
if [ "$OVERRIDE" != "none" ]; then
|
||||
while IFS=',' read -ra FILE; do
|
||||
add_override "$FILE"
|
||||
done <<< "$OVERRIDE"
|
||||
if [ "$SKIPOVERRIDE" = true ]; then
|
||||
return 0
|
||||
fi
|
||||
while IFS=',' read -ra FILE; do
|
||||
add_override "$FILE"
|
||||
done <<< "$OVERRIDE"
|
||||
}
|
||||
|
||||
remove_comments () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user