From 8b9a9652a30358f567cb3ed88653cfc32c3eb4f6 Mon Sep 17 00:00:00 2001 From: Jackson Law <178053+jlaw@users.noreply.github.com> Date: Sat, 4 Apr 2020 18:12:53 -0700 Subject: [PATCH] Strip '.git' from working dir when cloning repos --- larbs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/larbs.sh b/larbs.sh index c7fbcbd..eb97f32 100644 --- a/larbs.sh +++ b/larbs.sh @@ -101,7 +101,7 @@ maininstall() { # Installs all needed programs from main repo. } gitmakeinstall() { - progname="$(basename "$1")" + progname="$(basename "$1" .git)" dir="$repodir/$progname" 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;}