mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-22 05:12:27 +00:00
cleanup
This commit is contained in:
parent
9e6c014320
commit
5abccfb76c
|
@ -14,25 +14,29 @@ command_exists() {
|
|||
checkAURHelper() {
|
||||
## Check & Install AUR helper
|
||||
if [ "$PACKAGER" = "pacman" ]; then
|
||||
AUR_HELPERS="yay paru"
|
||||
for helper in ${AUR_HELPERS}; do
|
||||
if command_exists "${helper}"; then
|
||||
AUR_HELPER=${helper}
|
||||
echo "Using ${helper} as AUR helper"
|
||||
return 0
|
||||
if [ -z "$AUR_HELPER_CHECKED" ]; then
|
||||
AUR_HELPERS="yay paru"
|
||||
for helper in ${AUR_HELPERS}; do
|
||||
if command_exists "${helper}"; then
|
||||
AUR_HELPER=${helper}
|
||||
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
|
||||
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
|
||||
}
|
||||
|
@ -126,4 +130,5 @@ checkEnv() {
|
|||
checkSuperUser
|
||||
checkDistro
|
||||
checkEscalationTool
|
||||
checkAURHelper
|
||||
}
|
||||
|
|
|
@ -15,7 +15,6 @@ installDepend() {
|
|||
else
|
||||
echo "Multilib is already enabled."
|
||||
fi
|
||||
checkAURHelper
|
||||
$AUR_HELPER -S --needed --noconfirm "$DEPENDENCIES"
|
||||
;;
|
||||
apt-get|nala)
|
||||
|
@ -65,6 +64,7 @@ install_additional_dependencies() {
|
|||
}
|
||||
|
||||
checkEnv
|
||||
checkAURHelper
|
||||
checkEscalationTool
|
||||
installDepend
|
||||
install_additional_dependencies
|
||||
install_additional_dependencies
|
|
@ -13,7 +13,6 @@ installDepend() {
|
|||
else
|
||||
echo "Multilib is already enabled."
|
||||
fi
|
||||
checkAURHelper
|
||||
$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 \
|
||||
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
|
||||
checkAURHelper
|
||||
checkEscalationTool
|
||||
installDepend
|
||||
install_additional_dependencies
|
||||
install_additional_dependencies
|
|
@ -6,7 +6,6 @@ fastUpdate() {
|
|||
case ${PACKAGER} in
|
||||
pacman)
|
||||
|
||||
checkAURHelper
|
||||
$AUR_HELPER -S --needed --noconfirm rate-mirrors-bin
|
||||
|
||||
if [ -s /etc/pacman.d/mirrorlist ]; then
|
||||
|
@ -97,6 +96,7 @@ updateFlatpaks() {
|
|||
}
|
||||
|
||||
checkEnv
|
||||
checkAURHelper
|
||||
checkEscalationTool
|
||||
fastUpdate
|
||||
updateSystem
|
||||
|
|
Loading…
Reference in New Issue
Block a user