mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-05 21:28:48 +00:00
cleanup
This commit is contained in:
parent
9e6c014320
commit
5abccfb76c
|
@ -14,25 +14,29 @@ command_exists() {
|
||||||
checkAURHelper() {
|
checkAURHelper() {
|
||||||
## Check & Install AUR helper
|
## Check & Install AUR helper
|
||||||
if [ "$PACKAGER" = "pacman" ]; then
|
if [ "$PACKAGER" = "pacman" ]; then
|
||||||
AUR_HELPERS="yay paru"
|
if [ -z "$AUR_HELPER_CHECKED" ]; then
|
||||||
for helper in ${AUR_HELPERS}; do
|
AUR_HELPERS="yay paru"
|
||||||
if command_exists "${helper}"; then
|
for helper in ${AUR_HELPERS}; do
|
||||||
AUR_HELPER=${helper}
|
if command_exists "${helper}"; then
|
||||||
echo "Using ${helper} as AUR helper"
|
AUR_HELPER=${helper}
|
||||||
return 0
|
echo "Using ${helper} as AUR helper"
|
||||||
|
AUR_HELPER_CHECKED=true
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Installing yay as AUR helper..."
|
||||||
|
$ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm base-devel
|
||||||
|
cd /opt && $ESCALATION_TOOL git clone https://aur.archlinux.org/yay-git.git && $ESCALATION_TOOL chown -R "$USER":"$USER" ./yay-git
|
||||||
|
cd yay-git && makepkg --noconfirm -si
|
||||||
|
|
||||||
|
if command_exists yay; then
|
||||||
|
AUR_HELPER="yay"
|
||||||
|
AUR_HELPER_CHECKED=true
|
||||||
|
else
|
||||||
|
echo -e "${RED}Failed to install AUR helper.${RC}"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
|
||||||
|
|
||||||
echo "Installing yay as AUR helper..."
|
|
||||||
$ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm base-devel
|
|
||||||
cd /opt && $ESCALATION_TOOL git clone https://aur.archlinux.org/yay-git.git && $ESCALATION_TOOL chown -R "$USER":"$USER" ./yay-git
|
|
||||||
cd yay-git && makepkg --noconfirm -si
|
|
||||||
|
|
||||||
if command_exists yay; then
|
|
||||||
AUR_HELPER="yay"
|
|
||||||
else
|
|
||||||
echo -e "${RED}Failed to install AUR helper.${RC}"
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -126,4 +130,5 @@ checkEnv() {
|
||||||
checkSuperUser
|
checkSuperUser
|
||||||
checkDistro
|
checkDistro
|
||||||
checkEscalationTool
|
checkEscalationTool
|
||||||
|
checkAURHelper
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,6 @@ installDepend() {
|
||||||
else
|
else
|
||||||
echo "Multilib is already enabled."
|
echo "Multilib is already enabled."
|
||||||
fi
|
fi
|
||||||
checkAURHelper
|
|
||||||
$AUR_HELPER -S --needed --noconfirm "$DEPENDENCIES"
|
$AUR_HELPER -S --needed --noconfirm "$DEPENDENCIES"
|
||||||
;;
|
;;
|
||||||
apt-get|nala)
|
apt-get|nala)
|
||||||
|
@ -65,6 +64,7 @@ install_additional_dependencies() {
|
||||||
}
|
}
|
||||||
|
|
||||||
checkEnv
|
checkEnv
|
||||||
|
checkAURHelper
|
||||||
checkEscalationTool
|
checkEscalationTool
|
||||||
installDepend
|
installDepend
|
||||||
install_additional_dependencies
|
install_additional_dependencies
|
|
@ -13,7 +13,6 @@ installDepend() {
|
||||||
else
|
else
|
||||||
echo "Multilib is already enabled."
|
echo "Multilib is already enabled."
|
||||||
fi
|
fi
|
||||||
checkAURHelper
|
|
||||||
$AUR_HELPER -S --needed --noconfirm wine giflib lib32-giflib libpng lib32-libpng libldap lib32-libldap gnutls lib32-gnutls \
|
$AUR_HELPER -S --needed --noconfirm wine giflib lib32-giflib libpng lib32-libpng libldap lib32-libldap gnutls lib32-gnutls \
|
||||||
mpg123 lib32-mpg123 openal lib32-openal v4l-utils lib32-v4l-utils libpulse lib32-libpulse libgpg-error \
|
mpg123 lib32-mpg123 openal lib32-openal v4l-utils lib32-v4l-utils libpulse lib32-libpulse libgpg-error \
|
||||||
lib32-libgpg-error alsa-plugins lib32-alsa-plugins alsa-lib lib32-alsa-lib libjpeg-turbo lib32-libjpeg-turbo \
|
lib32-libgpg-error alsa-plugins lib32-alsa-plugins alsa-lib lib32-alsa-lib libjpeg-turbo lib32-libjpeg-turbo \
|
||||||
|
@ -94,6 +93,7 @@ install_additional_dependencies() {
|
||||||
}
|
}
|
||||||
|
|
||||||
checkEnv
|
checkEnv
|
||||||
|
checkAURHelper
|
||||||
checkEscalationTool
|
checkEscalationTool
|
||||||
installDepend
|
installDepend
|
||||||
install_additional_dependencies
|
install_additional_dependencies
|
|
@ -6,7 +6,6 @@ fastUpdate() {
|
||||||
case ${PACKAGER} in
|
case ${PACKAGER} in
|
||||||
pacman)
|
pacman)
|
||||||
|
|
||||||
checkAURHelper
|
|
||||||
$AUR_HELPER -S --needed --noconfirm rate-mirrors-bin
|
$AUR_HELPER -S --needed --noconfirm rate-mirrors-bin
|
||||||
|
|
||||||
if [ -s /etc/pacman.d/mirrorlist ]; then
|
if [ -s /etc/pacman.d/mirrorlist ]; then
|
||||||
|
@ -97,6 +96,7 @@ updateFlatpaks() {
|
||||||
}
|
}
|
||||||
|
|
||||||
checkEnv
|
checkEnv
|
||||||
|
checkAURHelper
|
||||||
checkEscalationTool
|
checkEscalationTool
|
||||||
fastUpdate
|
fastUpdate
|
||||||
updateSystem
|
updateSystem
|
||||||
|
|
Loading…
Reference in New Issue
Block a user