From c0305a0204db4b988193aede6460b2f7ea6c32c3 Mon Sep 17 00:00:00 2001 From: jdedde <108427516+jdedde@users.noreply.github.com> Date: Wed, 29 Jun 2022 19:50:08 +0000 Subject: [PATCH] Fix: Reordering Git's option to work properly --- larbs.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/larbs.sh b/larbs.sh index 1792bcf..a785698 100755 --- a/larbs.sh +++ b/larbs.sh @@ -92,7 +92,7 @@ manualinstall() { # Installs $1 manually. Used only for AUR helper here. # Should be run after repodir is created and var is set. dialog --infobox "Installing \"$1\", an AUR helper..." 4 50 sudo -u "$name" mkdir -p "$repodir/$1" - sudo -u "$name" git clone -C "$repodir/$1" --depth 1 --single-branch --no-tags -q "https://aur.archlinux.org/$1.git" "$repodir/$1" \ + sudo -u "$name" git -C "$repodir/$1" clone --depth 1 --single-branch --no-tags -q "https://aur.archlinux.org/$1.git" "$repodir/$1" \ || { cd "$repodir/$1" || return 1 ; sudo -u "$name" git pull --force origin master ;} cd "$repodir/$1" || exit 1 sudo -u "$name" -D "$repodir/$1" makepkg --noconfirm -si >/dev/null 2>&1 || return 1 @@ -107,7 +107,7 @@ gitmakeinstall() { 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 -C "$repodir/$1" --depth 1 --single-branch --no-tags -q "$1" "$dir" || { cd "$dir" || return 1 ; sudo -u "$name" git pull --force origin master ;} + sudo -u "$name" git -C "$repodir/$1" clone --depth 1 --single-branch --no-tags -q "$1" "$dir" || { cd "$dir" || return 1 ; sudo -u "$name" git pull --force origin master ;} cd "$dir" || exit 1 make >/dev/null 2>&1 make install >/dev/null 2>&1 @@ -146,7 +146,7 @@ putgitrepo() { # Downloads a gitrepo $1 and places the files in $2 only overwrit dir=$(mktemp -d) [ ! -d "$2" ] && mkdir -p "$2" chown "$name":wheel "$dir" "$2" - sudo -u "$name" git clone -C "$repodir/$1" --depth 1 --single-branch --no-tags -q --recursive -b "$branch" --recurse-submodules "$1" "$dir" + sudo -u "$name" git -C "$repodir/$1" clone --depth 1 --single-branch --no-tags -q --recursive -b "$branch" --recurse-submodules "$1" "$dir" sudo -u "$name" cp -rfT "$dir" "$2" }