First lines of the script committed

This commit is contained in:
2020-02-11 23:12:12 +01:00
parent f44037628b
commit 1379a10dfd

30
xabs.sh Executable file
View File

@@ -0,0 +1,30 @@
#!/bin/sh
# Xavi's Script for lazy installs
# License: MIT
#
## OPTIONS ##
while getopts "nh" o; do case "${o}" in
h) printf "help" && exit ;;
n) printf "user requested" && exit;;
#*) printf "invalid option -%s\\n" "$OPTARG" && exit ;;
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
}
# WTF is this line for??
grepseq="\"^[PGA]*,\""
## SCRIPT START ##
installpkg dialog || error "Are you root and have an active internet connection?"
# Welcome everyone!
welcomemsg || error "Exited"