Strip '.git' from working dir when cloning repos

This commit is contained in:
Jackson Law 2020-04-04 18:12:53 -07:00
parent 2db2b6900f
commit 8b9a9652a3

View file

@ -101,7 +101,7 @@ maininstall() { # Installs all needed programs from main repo.
} }
gitmakeinstall() { gitmakeinstall() {
progname="$(basename "$1")" progname="$(basename "$1" .git)"
dir="$repodir/$progname" dir="$repodir/$progname"
dialog --title "LARBS Installation" --infobox "Installing \`$progname\` ($n of $total) via \`git\` and \`make\`. $(basename "$1") $2" 5 70 dialog --title "LARBS Installation" --infobox "Installing \`$progname\` ($n of $total) via \`git\` and \`make\`. $(basename "$1") $2" 5 70
sudo -u "$name" git clone --depth 1 "$1" "$dir" >/dev/null 2>&1 || { cd "$dir" || return ; sudo -u "$name" git pull --force origin master;} sudo -u "$name" git clone --depth 1 "$1" "$dir" >/dev/null 2>&1 || { cd "$dir" || return ; sudo -u "$name" git pull --force origin master;}