diff --git a/setup/android_build_env.sh b/setup/android_build_env.sh index 3bc45dc0..a03e5387 100755 --- a/setup/android_build_env.sh +++ b/setup/android_build_env.sh @@ -16,14 +16,16 @@ PACKAGES="" sudo apt install software-properties-common -y sudo apt 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 - -LSB_RELEASE="$(lsb_release -d | cut -d ':' -f 2 | sed -e 's/^[[:space:]]*//')" +fi if [[ ${LSB_RELEASE} =~ "Mint 18" || ${LSB_RELEASE} =~ "Ubuntu 16" ]]; then PACKAGES="${UBUNTU_16_PACKAGES}" -elif [[ ${LSB_RELEASE} =~ "Ubuntu 20" || ${LSB_RELEASE} =~ "Ubuntu 21" || ${LSB_RELEASE} =~ "Ubuntu 22" || ${LSB_RELEASE} =~ 'Pop!_OS 2' ]]; then +elif [[ ${LSB_RELEASE} =~ "Ubuntu 20" || ${LSB_RELEASE} =~ "Ubuntu 21" || ${LSB_RELEASE} =~ "Ubuntu 22" || ${LSB_RELEASE} =~ "Ubuntu 23" || ${LSB_RELEASE} =~ 'Pop!_OS 2' ]]; then PACKAGES="${UBUNTU_20_PACKAGES}" elif [[ ${LSB_RELEASE} =~ "Debian GNU/Linux 10" ]]; then PACKAGES="${DEBIAN_10_PACKAGES}" @@ -31,6 +33,10 @@ elif [[ ${LSB_RELEASE} =~ "Debian GNU/Linux 11" ]]; then PACKAGES="${DEBIAN_11_PACKAGES}" 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 +fi + sudo DEBIAN_FRONTEND=noninteractive \ apt install \ adb autoconf automake axel bc bison build-essential \ @@ -40,7 +46,7 @@ sudo DEBIAN_FRONTEND=noninteractive \ libexpat1-dev libgmp-dev '^liblz4-.*' '^liblzma.*' libmpc-dev libmpfr-dev libncurses5-dev \ libsdl1.2-dev libssl-dev libtool libxml2 libxml2-utils '^lzma.*' lzop \ maven ncftp ncurses-dev patch patchelf pkg-config pngcrush \ - pngquant python2.7 python-all-dev re2c schedtool squashfs-tools subversion \ + pngquant re2c schedtool squashfs-tools subversion \ texinfo unzip w3m xsltproc zip zlib1g-dev lzip \ libxml-simple-perl libswitch-perl apt-utils \ ${PACKAGES} -y