File tree Expand file tree Collapse file tree 2 files changed +25
-3
lines changed
Expand file tree Collapse file tree 2 files changed +25
-3
lines changed Original file line number Diff line number Diff line change 22
33# # prefs.js cleaner for Linux/Mac
44# # author: @claustromaniac
5- # # version: 1.6
5+ # # version: 1.7
66
77# # special thanks to @overdodactyl and @earthlng for a few snippets that I stol..*cough* borrowed from the updater.sh
88
99# # DON'T GO HIGHER THAN VERSION x.9 !! ( because of ASCII comparison in update_prefsCleaner() )
1010
11+ # Check if running as root and if any files have the owner/group as root/wheel.
12+ if [ " ${EUID:- " $( id -u) " } " -eq 0 ]; then
13+ printf ' You shouldn' t run this with elevated privileges (such as with doas/sudo).\n '
14+ exit 1
15+ elif [ -n "$(find ./ -user 0 -o -group 0)" ]; then
16+ printf ' It looks like this script was previously run with elevated privileges,
17+ you will need to change ownership of the following files to your user:\n '
18+ find . -user 0 -o -group 0
19+ exit 1
20+ fi
21+
1122readonly CURRDIR=$(pwd)
1223
1324## get the full path of this script (readlink for Linux, greadlink for Mac with coreutils installed)
@@ -138,7 +149,7 @@ echo -e "\n\n"
138149echo " ╔══════════════════════════╗"
139150echo " ║ prefs.js cleaner ║"
140151echo " ║ by claustromaniac ║"
141- echo " ║ v1.6 ║"
152+ echo " ║ v1.7 ║"
142153echo " ╚══════════════════════════╝"
143154echo -e "\nThis script should be run from your Firefox profile directory.\n"
144155echo "It will remove any entries from prefs.js that also exist in user.js."
Original file line number Diff line number Diff line change 22
33# # arkenfox user.js updater for macOS and Linux
44
5- # # version: 3.5
5+ # # version: 3.6
66# # Author: Pat Johnson (@overdodactyl)
77# # Additional contributors: @earthlng, @ema-pe, @claustromaniac, @infinitewarp
88
99# # DON'T GO HIGHER THAN VERSION x.9 !! ( because of ASCII comparison in update_updater() )
1010
11+ # Check if running as root and if any files have the owner/group as root/wheel.
12+ if [ " ${EUID:- " $( id -u) " } " -eq 0 ]; then
13+ printf ' You shouldn' t run this with elevated privileges (such as with doas/sudo).\n '
14+ exit 1
15+ elif [ -n "$(find ./ -user 0 -o -group 0)" ]; then
16+ printf ' It looks like this script was previously run with elevated privileges,
17+ you will need to change ownership of the following files to your user:\n '
18+ find . -user 0 -o -group 0
19+ exit 1
20+ fi
21+
1122readonly CURRDIR=$(pwd)
1223
1324SCRIPT_FILE=$(readlink -f "${BASH_SOURCE[0]}" 2>/dev/null || greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null)
You can’t perform that action at this time.
0 commit comments