Files
arch-installer/xabs.sh

40 lines
796 B
Bash
Executable File

#!/bin/sh
# Xavi's Script for lazy installs
# License: MIT
#
## OPTIONS ##
usage() { printf "helping" && exit 1; }
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(){
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"