mirror of
https://github.com/arkenfox/user.js.git
synced 2025-05-07 17:33:45 +02:00
Update prefsCleaner.sh
This commit is contained in:
parent
89e603d7da
commit
7f095463b6
1 changed files with 2 additions and 3 deletions
|
@ -37,14 +37,13 @@ fClean() {
|
||||||
# the magic happens here
|
# the magic happens here
|
||||||
prefs="@@"
|
prefs="@@"
|
||||||
prefexp="user_pref[ ]*\([ ]*[\"']([^\"']*)[\"'][ ]*,"
|
prefexp="user_pref[ ]*\([ ]*[\"']([^\"']*)[\"'][ ]*,"
|
||||||
grep -E "${prefexp}" user.js >/tmp/userjs_updater_temp.dat
|
while read -r line; do
|
||||||
while read line; do
|
|
||||||
if [[ "$line" =~ $prefexp ]]; then
|
if [[ "$line" =~ $prefexp ]]; then
|
||||||
if [[ $prefs != *"@@${BASH_REMATCH[1]}@@"* ]]; then
|
if [[ $prefs != *"@@${BASH_REMATCH[1]}@@"* ]]; then
|
||||||
prefs="${prefs}${BASH_REMATCH[1]}@@"
|
prefs="${prefs}${BASH_REMATCH[1]}@@"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done < /tmp/userjs_updater_temp.dat
|
done <<< "`grep -E "$prefexp" user.js`"
|
||||||
|
|
||||||
while IFS='' read -r line || [[ -n "$line" ]]; do
|
while IFS='' read -r line || [[ -n "$line" ]]; do
|
||||||
if [[ "$line" =~ ^$prefexp ]]; then
|
if [[ "$line" =~ ^$prefexp ]]; then
|
||||||
|
|
Loading…
Add table
Reference in a new issue