Chagne git parameter order for gitmakeinstall.

Remove git repo from working directory in gitmakeinstall & putgitrepo
This commit is contained in:
Ryan C. England 2022-07-01 10:14:04 -04:00
parent b93f3c96ed
commit ca408ae6ce

View File

@ -131,7 +131,7 @@ gitmakeinstall() {
dir="$repodir/$progname" dir="$repodir/$progname"
dialog --title "LARBS Installation" \ dialog --title "LARBS Installation" \
--infobox "Installing \`$progname\` ($n of $total) via \`git\` and \`make\`. $(basename "$1") $2" 5 70 --infobox "Installing \`$progname\` ($n of $total) via \`git\` and \`make\`. $(basename "$1") $2" 5 70
sudo -u "$name" git clone -C "$repodir/$1" \ sudo -u "$name" git -C "$repodir" clone \
--depth 1 --single-branch --no-tags -q "$1" "$dir" \ --depth 1 --single-branch --no-tags -q "$1" "$dir" \
|| { cd "$dir" || return 1 ; sudo -u "$name" git pull --force origin master ;} || { cd "$dir" || return 1 ; sudo -u "$name" git pull --force origin master ;}
cd "$dir" || exit 1 cd "$dir" || exit 1
@ -179,7 +179,7 @@ putgitrepo() {
dir=$(mktemp -d) dir=$(mktemp -d)
[ ! -d "$2" ] && mkdir -p "$2" [ ! -d "$2" ] && mkdir -p "$2"
chown "$name":wheel "$dir" "$2" chown "$name":wheel "$dir" "$2"
sudo -u "$name" git -C "$repodir/$1" clone --depth 1 \ sudo -u "$name" git -C "$repodir" clone --depth 1 \
--single-branch --no-tags -q --recursive -b "$branch" \ --single-branch --no-tags -q --recursive -b "$branch" \
--recurse-submodules "$1" "$dir" --recurse-submodules "$1" "$dir"
sudo -u "$name" cp -rfT "$dir" "$2" sudo -u "$name" cp -rfT "$dir" "$2"