diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2024-07-10 22:44:10 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2024-07-10 22:44:10 +0900 |
| commit | 2f8569fcec6d4ec7b3e4b26208e812acefd41ed6 (patch) | |
| tree | c05665a80f9b3446c3af2c6883f47c164a952cb9 /static/thesiah-debian.sh | |
| parent | 50db37907c46516330476d470619d0eb4f9fca19 (diff) | |
Init
Diffstat (limited to 'static/thesiah-debian.sh')
| -rwxr-xr-x | static/thesiah-debian.sh | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/static/thesiah-debian.sh b/static/thesiah-debian.sh index 461f053..9b96052 100755 --- a/static/thesiah-debian.sh +++ b/static/thesiah-debian.sh @@ -96,10 +96,12 @@ maininstall() { } putgitrepo() { - whiptail --infobox "Downloading and installing config files..." 7 60 - [ -z "$3" ] && branch="main" || branch="$3" - dir=$(mktemp -d) - [ ! -d "$2" ] && mkdir -p "$2" + # Downloads a gitrepo $1 and places the files in $2 only overwriting conflicts + whiptail --infobox "Downloading and installing config files..." 7 60 + [ -z "$3" ] && branch="master" || branch="$repobranch" + dir=$(mktemp -d) + [ ! -d "$2" ] && mkdir -p "$2" + chown "$name":sudo "$dir" "$2" sudo -u "$name" git -C "$repodir" clone --depth 1 \ --single-branch --no-tags -q --recursive -b "$branch" \ --recurse-submodules "$1" "$dir" @@ -113,10 +115,10 @@ gitmakeinstall() { whiptail --title "SI Installation" \ --infobox "Installing \`$progname\` ($n of $total) via \`git\` and \`make\`. $(basename "$1") $2" 8 70 sudo -u "$name" git -C "$repodir" clone --depth 1 --single-branch \ - --no-tags -q "$1" "$dir" || + --no-tags -q "$1" "$dir" >/dev/null 2>&1 || { cd "$dir" || return 1 - sudo -u "$name" git pull --force origin master + sudo -u "$name" git pull --force origin master >/dev/null 2>&1 } # Check the repository name and act accordingly for suckless case "$progname" in |
