From 9af99602fec6c55fe3fd18df992349f8a9a3ebb9 Mon Sep 17 00:00:00 2001 From: Adel Ejjeh <aejjeh@tyler.cs.illinois.edu> Date: Fri, 24 Jan 2020 18:09:42 -0600 Subject: [PATCH] modified user input in llvm installer script --- hpvm/llvm_installer/llvm_installer.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hpvm/llvm_installer/llvm_installer.sh b/hpvm/llvm_installer/llvm_installer.sh index 29d629c3f6..a972fb62ad 100755 --- a/hpvm/llvm_installer/llvm_installer.sh +++ b/hpvm/llvm_installer/llvm_installer.sh @@ -21,10 +21,15 @@ LIBCXXABI_SRC="libcxxabi-$VERSION.src" AUTOMATE="y" -read -n 1 -p "Build and install HPVM automatically? (y or n): " AUTOMATE +read -p "Build and install HPVM automatically? (y or n): " AUTOMATE + +if [ ! $AUTOMATE == "y" ] && [ ! $AUTOMATE == "n" ]; then + echo invalid input! + exit -1 +fi echo -read -n 2 -p "Number of threads: " NUM_THREADS +read -p "Number of threads: " NUM_THREADS if [ ! $NUM_THREADS -gt 0 ]; then NUM_THREADS = 2 -- GitLab