mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-06 13:39:41 +00:00
53cbb4b733
* Fix package managers * Update core/tabs/applications-setup/Developer-tools/githubdesktop-setup.sh Co-authored-by: Adam Perkowski <adas1per@protonmail.com> * Update core/tabs/applications-setup/Developer-tools/vscodium-setup.sh Co-authored-by: Adam Perkowski <adas1per@protonmail.com> * Update core/tabs/applications-setup/Developer-tools/sublime-setup.sh Co-authored-by: Adam Perkowski <adas1per@protonmail.com> * Update core/tabs/applications-setup/Developer-tools/vscode-setup.sh Co-authored-by: Adam Perkowski <adas1per@protonmail.com> * Update core/tabs/applications-setup/browser-setup.sh Co-authored-by: Adam Perkowski <adas1per@protonmail.com> --------- Co-authored-by: Chris Titus <contact@christitus.com> Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
43 lines
1.4 KiB
Bash
43 lines
1.4 KiB
Bash
#!/bin/sh -e
|
|
|
|
. ../common-script.sh
|
|
|
|
install_adb() {
|
|
if ! command_exists adb ; then
|
|
printf "%b\n" "${YELLOW}Installing ADB...${RC}."
|
|
case "$PACKAGER" in
|
|
apt-get|nala)
|
|
"$ESCALATION_TOOL" "$PACKAGER" install -y android-sdk-platform-tools
|
|
;;
|
|
pacman)
|
|
"$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm android-tools
|
|
;;
|
|
dnf|zypper)
|
|
"$ESCALATION_TOOL" "$PACKAGER" install -y android-tools
|
|
;;
|
|
*)
|
|
printf "%b\n" "${RED}Unsupported package manager: "$PACKAGER"${RC}"
|
|
exit 1
|
|
;;
|
|
esac
|
|
else
|
|
printf "%b\n" "${GREEN}ADB is already installed.${RC}"
|
|
fi
|
|
}
|
|
|
|
install_universal_android_debloater() {
|
|
if ! command_exists uad; then
|
|
printf "%b\n" "${YELLOW}Installing Universal Android Debloater...${RC}."
|
|
curl -sSLo "${HOME}/uad" "https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/releases/download/v1.1.0/uad-ng-linux"
|
|
"$ESCALATION_TOOL" chmod +x "${HOME}/uad"
|
|
"$ESCALATION_TOOL" mv "${HOME}/uad" /usr/local/bin/uad
|
|
else
|
|
printf "%b\n" "${GREEN}Universal Android Debloater is already installed. Run 'uad' command to execute.${RC}"
|
|
fi
|
|
}
|
|
|
|
checkEnv
|
|
checkEscalationTool
|
|
install_adb
|
|
install_universal_android_debloater
|