From 1379a10dfd4e0a049862b5fb6b945834e2de523b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavi=20Ondo=C3=B1o?= Date: Tue, 11 Feb 2020 23:12:12 +0100 Subject: [PATCH] First lines of the script committed --- xabs.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 xabs.sh diff --git a/xabs.sh b/xabs.sh new file mode 100755 index 0000000..9d89ec3 --- /dev/null +++ b/xabs.sh @@ -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" +