Skip to content

Commit

Permalink
scripts: Use nala as apt frontend
Browse files Browse the repository at this point in the history
Change-Id: If93ab3ac7377850ee0f1c40161ec73ce7d3246d4
  • Loading branch information
ElectroPerf committed Oct 26, 2023
1 parent dc28b16 commit 7fa677e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions setup/android_build_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ DEBIAN_10_PACKAGES="libncurses5"
DEBIAN_11_PACKAGES="libncurses5"
PACKAGES=""

sudo apt install software-properties-common -y
sudo apt update
sudo nala install software-properties-common -y
sudo nala update

LSB_RELEASE="$(lsb_release -d | cut -d ':' -f 2 | sed -e 's/^[[:space:]]*//')"

if [[ ${LSB_RELEASE} =~ "Ubuntu 20" || ${LSB_RELEASE} =~ "Ubuntu 21" || ${LSB_RELEASE} =~ "Ubuntu 22" || ${LSB_RELEASE} =~ 'Pop!_OS 2' ]]; then
# Install lsb-core packages
sudo apt install lsb-core -y
sudo nala install lsb-core -y
fi

if [[ ${LSB_RELEASE} =~ "Mint 18" || ${LSB_RELEASE} =~ "Ubuntu 16" ]]; then
Expand All @@ -34,11 +34,11 @@ elif [[ ${LSB_RELEASE} =~ "Debian GNU/Linux 11" ]]; then
fi

if [[ ${LSB_RELEASE} =~ "Ubuntu 20" || ${LSB_RELEASE} =~ "Ubuntu 21" || ${LSB_RELEASE} =~ "Ubuntu 22" || ${LSB_RELEASE} =~ 'Pop!_OS 2' ]]; then
sudo apt install python2.7 python-all-dev -y
sudo nala install python2.7 python-all-dev -y
fi

sudo DEBIAN_FRONTEND=noninteractive \
apt install \
nala install \
adb autoconf automake axel bc bison build-essential \
ccache clang cmake curl expat fastboot flex g++ \
g++-multilib gawk gcc gcc-multilib git git-lfs gnupg gperf \
Expand All @@ -48,15 +48,15 @@ sudo DEBIAN_FRONTEND=noninteractive \
maven ncftp ncurses-dev patch patchelf pkg-config pngcrush \
pngquant re2c schedtool squashfs-tools subversion \
texinfo unzip w3m xsltproc zip zlib1g-dev lzip \
libxml-simple-perl libswitch-perl apt-utils rsync \
libxml-simple-perl libswitch-perl nala-utils rsync \
${PACKAGES} -y

echo -e "Installing GitHub CLI"
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt update
sudo apt install -y gh
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/nala/sources.list.d/github-cli.list > /dev/null
sudo nala update
sudo nala install -y gh

echo -e "Setting up udev rules for adb!"
sudo curl --create-dirs -L -o /etc/udev/rules.d/51-android.rules -O -L https://raw.githubusercontent.com/M0Rf30/android-udev-rules/master/51-android.rules
Expand Down

0 comments on commit 7fa677e

Please sign in to comment.