Update updater.sh

Co-Authored-By: earthlng <earthlng@users.noreply.github.com>
This commit is contained in:
claustromaniac 2018-11-26 14:03:06 +00:00 committed by GitHub
parent 48e7349ef7
commit 8f5f67ad44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -145,7 +145,7 @@ readIniFile () { # expects one argument: absolute path of profiles.ini
echo ''
read -p 'Select the profile number ( 0 for Profile0, 1 for Profile1, etc ) : ' -n 1 -r
echo -e "\n"
if [[ $REPLY =~ ^[0-9]$ ]]; then
if [[ $REPLY =~ ^(0|[1-9][0-9]*)$ ]]; then
grep '^\[Profile'${REPLY} -A 4 "$inifile" | grep -v '^\[Profile'${REPLY} > $tfile
if [[ "$?" != "0" ]]; then
echo "Profile${REPLY} does not exist!" && exit 1