From 9cb708c4f17f39c039b8a1b75ccd8c0ce773f99c Mon Sep 17 00:00:00 2001 From: sr229 Date: Fri, 21 Sep 2018 23:04:05 +0800 Subject: [PATCH] :confetti: POSIX COMPLIANT :confetti: --- autobuild.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autobuild.sh b/autobuild.sh index b2eb94d..ec7ad12 100755 --- a/autobuild.sh +++ b/autobuild.sh @@ -143,7 +143,7 @@ case "$1" in print_help exit 2; else - if [ "$2" =~ "$regex" ] || [ -z "$2" ]; then + if [ "echo $2 | grep $regex >/dev/null 2>&1" ] || [ -z "$2" ]; then echo "! -- Error: Invalid input. Try again." exit 2; elif [ ! -d "$2" ]; then @@ -169,7 +169,7 @@ case "$1" in esac # Really needed Type Checks -while [ "$input" =~ "$regex" ] || [ -z "$input" ] ; do +while [ "echo $input | grep $regex >/dev/null 2>&1" ] || [ -z "$input" ] ; do echo "! -- Error: Invalid input. Try again." read -p "Enter your mod's Location (use . if you have this script inside your mod folder): " input done