Skip to content

Commit cfc9031

Browse files
authored
Aur helpers (#210)
* Update arch-manjaro.sh * Update arch-manjaro.sh
1 parent 063c60a commit cfc9031

1 file changed

Lines changed: 16 additions & 9 deletions

File tree

setup/arch-manjaro.sh

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,22 @@ sudo pacman -Syyu --noconfirm --needed git git-lfs multilib-devel fontconfig ttf
1313
# Install android build prerequisites
1414
echo '[3/4] Installing Android building prerequisites'
1515
packages="ncurses5-compat-libs lib32-ncurses5-compat-libs aosp-devel xml2 lineageos-devel"
16-
for package in $packages; do
17-
echo "Installing $package"
18-
git clone https://aur.archlinux.org/"$package"
19-
cd "$package" || exit
20-
makepkg -si --skippgpcheck --noconfirm --needed
21-
cd - || exit
22-
rm -rf "$package"
23-
done
24-
16+
if command -v paru 2>&1 >/dev/null
17+
then
18+
paru -S --noconfirm --needed $packages
19+
elif command -v yay 2>&1 >/dev/null
20+
then
21+
yay -S --noconfirm --needed $packages
22+
else
23+
for package in $packages; do
24+
echo "Installing $package"
25+
git clone https://aur.archlinux.org/"$package"
26+
cd "$package" || exit
27+
makepkg -si --skippgpcheck --noconfirm --needed
28+
cd - || exit
29+
rm -rf "$package"
30+
done
31+
fi
2532
# Install adb and associated udev rules
2633
echo '[4/4] Installing adb convenience tools'
2734
sudo pacman -S --noconfirm --needed android-tools android-udev

0 commit comments

Comments
 (0)