fix: make interactive var global

This commit is contained in:
max_richter 2021-08-19 16:10:28 +02:00
parent ac6be60d95
commit 625b5d0815

View File

@ -1,6 +1,8 @@
#!/bin/bash
cd "$(dirname "$0")"
INTERACTIVE=$(tty -s && echo "true" || echo "false")
#Loading all the helper scripts
. ./helpers/installer.sh --source-only
. ./helpers/prompt.sh --source-only
@ -14,8 +16,6 @@ if [ "$(which git)" = "" ] && ["$(which curl)" = ""]; then
echo "-- installing prerequesits (git, curl) --"
INTERACTIVE=$(tty -s && echo "true" || echo "false")
if [ $INTERACTIVE = "true" ]; then
if [ "$(prompt " - do you want to continue")" != "yes" ]; then
echo " alllrighty then, byyye"