diff options
Diffstat (limited to 'slackware-bootstrap/bootstrap')
| -rwxr-xr-x | slackware-bootstrap/bootstrap | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/slackware-bootstrap/bootstrap b/slackware-bootstrap/bootstrap index d628cd6..4ff4dd2 100755 --- a/slackware-bootstrap/bootstrap +++ b/slackware-bootstrap/bootstrap @@ -3,14 +3,24 @@ basedir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) username="user" kernelver="6.15.2" +hasuser=0 while getopts u:a:f: flag do case "${flag}" in - u) username=${OPTARG};; + u) username=${OPTARG} + hasuser=1 + ;; esac done +if [[ $hasuser == 0 ]]; then + read -p "WARNING: username not provided. continue? [y/n] (n):" choice + if [[ $choice != "y" ]]; then + exit 1 + fi +fi + echo "working dir: $basedir" sh $basedir/user $username |
