unset variables used in script

This commit is contained in:
Marty Oehme 2019-03-11 11:25:36 +01:00
parent 765233aad3
commit 2681a38dab

View file

@ -5,13 +5,16 @@
### OPTIONS AND VARIABLES ###
# unset our temp variables, just in case they were used for something else in shell
unset progsfile dotfilesrepo targetuser targetpassword targetdeployment quietmode aurhelper
while getopts ":a:r:p:u:U:f:F:hq" o; do case "${o}" in
h) printf "Optional arguments for custom use:\\n -r: Dotfiles repository (local file or url)\\n -p: Dependencies and programs csv (local file or url)\\n -a: AUR helper (must have pacman-like syntax)\\n -h: Show this message\\n" && exit ;;
r) dotfilesrepo=${OPTARG} && git ls-remote "$dotfilesrepo" || exit ;;
a) aurhelper=${OPTARG} ;;
f) progsfile=${OPTARG} ;;
F) progsfile=${OPTARG} && exclusiveprogsfile=true ;;
p) packagegroups=${OPTARG} ;;
t) targetdeployment=${OPTARG} ;;
u) targetuser=${OPTARG} ;;
U) targetpassword=${OPTARG} ;;
q) quietmode=true;;