aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2020-08-12 00:48:28 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2020-08-12 00:48:28 +0200
commitf92de02473499669c1a83f8563b77a1c64ad4a02 (patch)
tree07e75318554202e38c292e2c1d22017d4b1d0fdb /scripts
parenta911bcfd5dc7827b597749b47d69649f88653476 (diff)
downloaddotfiles-f92de02473499669c1a83f8563b77a1c64ad4a02.tar.gz
asdf
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/system-setup64
1 files changed, 0 insertions, 64 deletions
diff --git a/scripts/system-setup b/scripts/system-setup
deleted file mode 100755
index 6e2bebe..0000000
--- a/scripts/system-setup
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/bin/bash
-
-#interactive systen setup
-
-AUTHKEY_FILE_URL="https://jonasgunz.de/authorized_keys"
-
-if [ $(id -u) -ne 0 ]; then
- echo Supposed to run as root.
- return 1
-fi
-
-yes_no()
-{
- read -p "$1 (y/[n])" inp
- case $inp in
- [yY]* ) return 0;;
- * ) return 1;;
- esac
-}
-
-selector()
-{
- local cnt=0
- local regex="^-?[0-9]+\$"
- for selection in "$@"
- do
- echo "$cnt) $selection"
- ((cnt=$cnt + 1))
- done
-
- read -p "(default=0) >" inp
- if [[ "$inp" =~ $regex ]] && [ $inp -ge 0 -a $inp -le $# ]
- then
- return $inp
- elif [ -z $inp ]
- then
- return 0
- else
- return -1
- fi
-}
-
-function user_setup() {
- while true; do
- read -p "Name for new User: " username
- if [ ! -z $username ]; then
- break;
- fi
- done
-}
-
-echo "Interactive system setup"
-
-while true ; do
- selector "User setup" "Exit"
- case $? in
- 0)
- user_setup;;
- 1)
- exit 0;;
- *)
- echo Wrong input;;
- esac
-done