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
|
||||
prefs="@@"
|
||||
prefexp="user_pref[ ]*\([ ]*[\"']([^\"']*)[\"'][ ]*,"
|
||||
grep -E "${prefexp}" user.js >/tmp/userjs_updater_temp.dat
|
||||
while read line; do
|
||||
while read -r line; do
|
||||
if [[ "$line" =~ $prefexp ]]; then
|
||||
if [[ $prefs != *"@@${BASH_REMATCH[1]}@@"* ]]; then
|
||||
prefs="${prefs}${BASH_REMATCH[1]}@@"
|
||||
fi
|
||||
fi
|
||||
done < /tmp/userjs_updater_temp.dat
|
||||
done <<< "`grep -E "$prefexp" user.js`"
|
||||
|
||||
while IFS='' read -r line || [[ -n "$line" ]]; do
|
||||
if [[ "$line" =~ ^$prefexp ]]; then
|
||||
|
|
Loading…
Add table
Reference in a new issue