diff --git a/README.md b/README.md index 8624388..8ee4497 100644 --- a/README.md +++ b/README.md @@ -6,3 +6,9 @@ following targets: - Archlinux clean install - Windows Subsystem for Linux 2 Arch iso (downloaded from github) - OS X (Because Apple) + + +## Things to automate: +- First install all pkgs listed in *file* +- Then set run the configuration commands in *file* +- Copy the dotfiles in repository *repo* diff --git a/xabs.sh b/xabs.sh index 9d89ec3..2fb3d56 100755 --- a/xabs.sh +++ b/xabs.sh @@ -3,28 +3,37 @@ # License: MIT # ## OPTIONS ## +usage() { printf "helping" && exit 1; } -while getopts "nh" o; do case "${o}" in - h) printf "help" && exit ;; +while getopts "nt" o; do case "${o}" in n) printf "user requested" && exit;; + t) testmode= $true;; #*) printf "invalid option -%s\\n" "$OPTARG" && exit ;; + *) usage;; esac done ## FUNCTIONS ## installpkg(){ - pacman --noconfirm --needed -S "$1" >/dev/null 2>&1 ; -} - -welcomemsg(){ - msg = "this is a test!" - dialog --title "Aloha!" --msgbox "hola" 10 60 + if ["$testmode" = $true ]; + then + echo "Installing" "$1" + else + echo "No test" + # pacman --noconfirm --needed -S "$1" >/dev/null 2>&1 ; + fi } # WTF is this line for?? grepseq="\"^[PGA]*,\"" +#error() {clear; printf "ERROR: \\n%s\\n" "$1"; exit;} + +welcomemsg(){ + dialog --title "Aloha!" --msgbox "hola" 10 60 +} + ## SCRIPT START ## installpkg dialog || error "Are you root and have an active internet connection?" # Welcome everyone! -welcomemsg || error "Exited" +#welcomemsg || error "Exited"