commit cfddc93d063d910044d8ccc8d99304c465a6c11b parent 587fd3e961919b577fba9aa0c50e02e279a35c56 Author: Markus Hanetzok <markus@hanetzok.net> Date: Mon, 30 Jan 2023 16:18:50 +0100 Fix git_install function Diffstat:
M | zerog | | | 7 | ++++--- |
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/zerog b/zerog @@ -64,9 +64,10 @@ suckless() { # Clone and install suckless programs } git_install() { # Basically a temporary AUR helper - sudo -u "$name" git clone "$2" /tmp/"$1" >/dev/null 2>>"$logfile" || { error "AUR: Could not clone from source ($2)"; } - cd /tmp/"$1" - yes | sudo -u "$name" LANG=C makepkg -si >/dev/null 2>>"$logfile" || { error "Could not makepkg $2"; } + prog_name="$(basename $1 .git)" + sudo -u "$name" git clone "$1" /tmp/"$prog_name" >/dev/null 2>>"$logfile" || { error "AUR: Could not clone from source ($prog_name)"; } + cd /tmp/"$prog_name" + yes | sudo -u "$name" LANG=C makepkg -si >/dev/null 2>>"$logfile" || { error "Could not makepkg $prog_name"; } } follow_up() {