File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,19 +77,37 @@ archlinux_pacman_aur_install() {
7777
7878 mkdir -p " $pkg_dir "
7979 pushd " $pkg_dir "
80- git clone --depth=1 " https://aur.archlinux.org/${pkg_name} " " package.git"
80+ if test -d " package.git" ; then
81+ pushd " package.git"
82+ : # git pull;
83+ popd
84+ else
85+ git clone --depth=1 " https://aur.archlinux.org/${pkg_name} " " package.git"
86+ fi
8187
8288 # Prevent error obtaining VCS status: exit status 128. Use -buildvcs=false to disable VCS stamping.
8389 # src: https://www.reddit.com/r/archlinux/comments/uqq6uu/comment/i8te37n/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button
8490 chmod -Rv 777 package.git
85- chown -Rv builduser:root package.git
91+ if id " builduser" & > /dev/null; then
92+ chown -Rv builduser:root package.git
93+ else
94+ chown -Rv $USER :$USER package.git
95+ fi
8696 git config --global --add safe.directory ' *'
8797
8898 pushd " package.git"
8999 ls -alh ./
90- sudo su - builduser -c " cd $pkg_dir /package.git; makepkg --syncdeps --install --noconfirm"
100+ if id " builduser" & > /dev/null; then
101+ sudo su - builduser -c " cd $pkg_dir /package.git; makepkg --syncdeps --install --noconfirm"
102+ else
103+ cd $pkg_dir /package.git; makepkg --syncdeps --install --noconfirm
104+ fi
91105 ls -alh ./
92- pacman --upgrade --noconfirm * .pkg.tar.zst
106+ if id " builduser" & > /dev/null; then
107+ pacman --upgrade --noconfirm * .pkg.tar.zst
108+ else
109+ sudo pacman --upgrade --noconfirm * .pkg.tar.zst
110+ fi
93111 popd
94112 popd
95113}
You can’t perform that action at this time.
0 commit comments