Code: Select all
# This one does work!
# Set the source path
TMPPATH=$(whiptail --backtitle "Linux Build Configuration" \
--title "Source-Code Path" \
--inputbox "Default: $SRCPATH" 0 60 \
3>&2 2>&1 1>&3)
# Exit if cancelled
if [ $? != "0" ]; then
echo "Cancelled by the user. No modifications have been made to your system."
exit 0
fi
# Change the path only if it was modified
if [ ! -z "$TMPPATH" ]; then
SRCPATH="$TMPPATH"
fi
# This one does NOT work?!
# Get the database admin username
DB_TMP=$(whiptail --backtitle "Linux Build Configuration" --title "Database Administrator Username" \
--inputbox "Default: root" 0 60 \
3>&2 2>&1 1>&3)
# Exit if cancelled
if [ $? != "0" ]; then
echo "Cancelled by the user. No modifications have been made to your databases."
return 0
fi
# Set the admin username if one was specified
if [ ! -z "$DB_TMP" ]; then
DB_ADMIN="$DB_TMP"
fi