mirror of
https://github.com/arkenfox/user.js.git
synced 2025-05-03 23:43:40 +02:00
fix profile check
This commit is contained in:
parent
db56940422
commit
0ae014a35a
1 changed files with 2 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
## ghacks-user.js updater for macOS and Linux
|
## ghacks-user.js updater for macOS and Linux
|
||||||
|
|
||||||
## version: 2.2
|
## version: 2.3
|
||||||
## Author: Pat Johnson (@overdodactyl)
|
## Author: Pat Johnson (@overdodactyl)
|
||||||
## Additional contributors: @earthlng, @ema-pe, @claustromaniac
|
## Additional contributors: @earthlng, @ema-pe, @claustromaniac
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ readIniFile () { # expects one argument: absolute path of profiles.ini
|
||||||
echo -e "\n"
|
echo -e "\n"
|
||||||
if [[ $REPLY =~ ^(0|[1-9][0-9]*)$ ]]; then
|
if [[ $REPLY =~ ^(0|[1-9][0-9]*)$ ]]; then
|
||||||
grep '^\[Profile'${REPLY} -A 4 "$inifile" | grep -v '^\[Profile'${REPLY} > $tfile
|
grep '^\[Profile'${REPLY} -A 4 "$inifile" | grep -v '^\[Profile'${REPLY} > $tfile
|
||||||
if [ !$? ]; then
|
if [[ "$?" != "0" ]]; then
|
||||||
echo "Profile${REPLY} does not exist!" && exit 1
|
echo "Profile${REPLY} does not exist!" && exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue