Install Script Testing

This commit is contained in:
Dante 2024-03-13 11:42:02 -05:00 committed by GitHub
parent a523ee2b13
commit a11d325a19
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 1580 additions and 0 deletions

49
Scripts/install_aur.sh Normal file
View file

@ -0,0 +1,49 @@
#!/bin/bash
#|---/ /+-----------------------------------+---/ /|#
#|--/ /-| Script to install aur helper, yay |--/ /-|#
#|-/ /--| Prasanth Rangan |-/ /--|#
#|/ /---+-----------------------------------+/ /---|#
source global_fn.sh
if [ $? -ne 0 ] ; then
echo "Error: unable to source global_fn.sh, please execute from $(dirname "$(realpath "$0")")..."
exit 1
fi
aurhlpr="${1:-yay}"
if pkg_installed yay || pkg_installed paru
then
echo "aur helper is already installed..."
exit 0
fi
if [ -d ~/Clone ]
then
echo "~/Clone directory exists..."
rm -rf ~/Clone/$aurhlpr
else
mkdir ~/Clone
echo -e "[Desktop Entry]\nIcon=default-folder-git" > ~/Clone/.directory
echo "~/Clone directory created..."
fi
if pkg_installed git
then
git clone https://aur.archlinux.org/$aurhlpr.git ~/Clone/$aurhlpr
else
echo "git dependency is not installed..."
exit 1
fi
cd ~/Clone/$aurhlpr
makepkg ${use_default} -si
if [ $? -eq 0 ]
then
echo "$aurhlpr aur helper installed..."
exit 0
else
echo "$aurhlpr installation failed..."
exit 1
fi