|
2 | 2 |
|
3 | 3 | ## arkenfox user.js updater for macOS and Linux |
4 | 4 |
|
5 | | -## version: 3.8 |
| 5 | +## version: 3.9 |
6 | 6 | ## Author: Pat Johnson (@overdodactyl) |
7 | 7 | ## Additional contributors: @earthlng, @ema-pe, @claustromaniac, @infinitewarp |
8 | 8 |
|
9 | 9 | ## DON'T GO HIGHER THAN VERSION x.9 !! ( because of ASCII comparison in update_updater() ) |
10 | 10 |
|
11 | | -# Check if running as root and if any files have the owner/group as root/wheel. |
| 11 | +# Check if running as root |
12 | 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 |
| 13 | + printf "You shouldn't run this with elevated privileges (such as with doas/sudo).\n" |
19 | 14 | exit 1 |
20 | 15 | fi |
21 | 16 |
|
@@ -396,6 +391,17 @@ show_banner |
396 | 391 | update_updater "$@" |
397 | 392 |
|
398 | 393 | getProfilePath # updates PROFILE_PATH or exits on error |
399 | | -cd "$PROFILE_PATH" && update_userjs |
| 394 | +cd "$PROFILE_PATH" || exit 1 |
| 395 | + |
| 396 | +# Check if any files have the owner/group as root/wheel. |
| 397 | +if [ -n "$(find ./ -user 0 -o -group 0)" ]; then |
| 398 | + printf 'It looks like this script was previously run with elevated privileges, |
| 399 | +you will need to change ownership of the following files to your user:\n' |
| 400 | + find . -user 0 -o -group 0 |
| 401 | + cd "$CURRDIR" |
| 402 | + exit 1 |
| 403 | +fi |
| 404 | + |
| 405 | +update_userjs |
400 | 406 |
|
401 | 407 | cd "$CURRDIR" |
0 commit comments