Skip to content

Commit

Permalink
:confetti: POSIX COMPLIANT :confetti:
Browse files Browse the repository at this point in the history
  • Loading branch information
sr229 committed Sep 21, 2018
1 parent 245da1b commit 9cb708c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions autobuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 9cb708c

Please sign in to comment.