diff --git a/larbs.sh b/larbs.sh index 70a6fa0..afa1ac4 100755 --- a/larbs.sh +++ b/larbs.sh @@ -10,7 +10,7 @@ ### while getopts ":a:r:p:h" o; do case "${o}" in - h) echo -e "Optional arguments for custom use:\n-r: Dotfiles repository\n-p: Dependencies and programs csv (url)\n-a: AUR helper (must have pacman-like syntax, specifically, \`-S\` to install)\n-h: Show this message" && exit ;; + h) echo -e "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, specifically, \`-S\` to install)\n-h: Show this message" && exit ;; r) dotfilesrepo=${OPTARG} && git ls-remote $dotfilesrepo || exit ;; p) progsfile=${OPTARG} ;; a) aurhelper=${OPTARG} ;; @@ -91,7 +91,7 @@ aurinstall() { \ } installationloop() { \ - curl -Ls "$progsfile" > /tmp/progs.csv + ([ -f "$progsfile" ] && cp "$progsfile" /tmp/progs.csv) || curl -Ls "$progsfile" > /tmp/progs.csv total=$(wc -l < /tmp/progs.csv) aurinstalled=$(pacman -Qm | awk '{print $1}') while IFS=, read -r tag program comment; do