mirror of
https://github.com/xsghetti/HyprCrux.git
synced 2025-07-03 05:40:38 -04:00
Install Script Testing
This commit is contained in:
parent
a523ee2b13
commit
a11d325a19
21 changed files with 1580 additions and 0 deletions
49
Scripts/install_aur.sh
Normal file
49
Scripts/install_aur.sh
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue