summaryrefslogtreecommitdiff
path: root/slackware-bootstrap/bootstrap
blob: 5cbe5f7ab2a07b666810dcc550cc142caa8a86ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
basedir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
username="user"

hasuser=0

while getopts u:a:f: flag
do
    case "${flag}" in
        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
sh $basedir/sudo
sh $basedir/step1