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