Add Ubuntu 20.04 support for dependency install

This commit is contained in:
LukeeGD 2020-04-27 13:16:07 +08:00
parent 8f05d96a39
commit bb3062326d
3 changed files with 18 additions and 20 deletions

1
.gitignore vendored
View File

@ -7,4 +7,5 @@
*.txt
iP*
saved/
resources/firmware/
tmp/

View File

@ -38,6 +38,7 @@
## OS versions/distros tested on:
- [Lubuntu 16.04](http://cdimage.ubuntu.com/lubuntu/releases/16.04/release/) live USB
- [Lubuntu 18.04](http://cdimage.ubuntu.com/lubuntu/releases/18.04/release/) live USB
- [Xubuntu 20.04](http://cdimage.ubuntu.com/xubuntu/releases/20.04/release/) live USB
- [Arch Linux](https://www.archlinux.org/) full install
- [Manjaro](https://manjaro.org/) live USB and full install
- macOS 10.13.6 High Sierra and 10.14.6 Mojave

View File

@ -301,11 +301,8 @@ function InstallDependencies {
. /etc/os-release 2>/dev/null
if [[ $(which pacman) ]]; then
Arch
elif [[ $VERSION_ID == "16.04" ]]; then
elif [[ $VERSION_ID == "16.04" ]] || [[ $VERSION_ID == "18.04" ]] || [[ $VERSION_ID == "20.04" ]]; then
Ubuntu
elif [[ $VERSION_ID == "18.04" ]]; then
Ubuntu
Ubuntu1804
elif [[ $OSTYPE == "darwin"* ]]; then
macOS
else
@ -339,22 +336,21 @@ function macOS {
function Ubuntu {
Log "Running APT update..."
sudo apt update
Log "Installing dependencies for Ubuntu with APT..."
sudo apt -y install bsdiff curl ifuse libimobiledevice-utils libzip4 python3 usbmuxd
}
function Ubuntu1804 {
Log "Installing dependencies for Ubuntu 18.04 with APT..."
Log "Installing dependencies for Ubuntu $VERSION_ID with APT..."
sudo apt -y install bsdiff curl ifuse libimobiledevice-utils python3 usbmuxd
if [[ $VERSION_ID ~= "16.04" ]]; then
sudo apt -y install binutils
mkdir tmp
cd tmp
apt download -o=dir::cache=. libcurl3
ar x libcurl3* data.tar.xz
curl -L http://archive.ubuntu.com/ubuntu/pool/universe/c/curl3/libcurl3_7.58.0-2ubuntu2_amd64.deb -o libcurl3.deb
ar x libcurl3.deb data.tar.xz
tar xf data.tar.xz
sudo cp usr/lib/x86_64-linux-gnu/libcurl.so.4.* /usr/lib/libcurl.so.3
curl -L http://mirrors.edge.kernel.org/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1.1_amd64.deb -o libpng12.deb
sudo dpkg -i libpng12.deb
cd ..
else
sudo apt -y install libzip4
fi
}
# --- MAIN SCRIPT STARTS HERE ---