mirror of
https://github.com/arkenfox/user.js.git
synced 2025-04-21 08:06:47 -04:00
Update updater.sh
reversed conditional check so it warns profile doesn't exist on non-zero exit code from grep
This commit is contained in:
parent
52bb5f7658
commit
b8466f24ae
@ -156,7 +156,7 @@ readIniFile () { # expects one argument: absolute path of profiles.ini
|
||||
read -p 'Select the profile number ( 0 for Profile0, 1 for Profile1, etc ) : ' -r
|
||||
echo -e "\n"
|
||||
if [[ $REPLY =~ ^(0|[1-9][0-9]*)$ ]]; then
|
||||
if grep "^\[Profile'${REPLY}" -A 4 "$inifile" | grep -v "^\[Profile'${REPLY}" > "$tfile"; then
|
||||
if ! grep "^\[Profile'${REPLY}" -A 4 "$inifile" | grep -v "^\[Profile'${REPLY}" > "$tfile"; then
|
||||
echo "Profile${REPLY} does not exist!" && exit 1
|
||||
fi
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user