larbs

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 8ee3f84f739d686169f3ac196b9d8852d431f8a5
parent 1777407fa35f51277add7c183e15d3dd898e3f95
Author: Luke Smith <luke@lukesmith.xyz>
Date:   Fri,  3 Aug 2018 01:46:07 -0400

both gitrepo and progs file can be local or url

Diffstat:
Mlarbs.sh | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 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