First lines of the script committed
This commit is contained in:
30
xabs.sh
Executable file
30
xabs.sh
Executable 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"
|
||||||
|
|
||||||
Reference in New Issue
Block a user