From bb3062326df5a6579c73c2ebe0eadf11294531ad Mon Sep 17 00:00:00 2001 From: LukeeGD Date: Mon, 27 Apr 2020 13:16:07 +0800 Subject: [PATCH] Add Ubuntu 20.04 support for dependency install --- .gitignore | 1 + README.md | 1 + restore.sh | 36 ++++++++++++++++-------------------- 3 files changed, 18 insertions(+), 20 deletions(-) diff --git a/.gitignore b/.gitignore index 1aa04b8..039ed1b 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ *.txt iP* saved/ +resources/firmware/ tmp/ diff --git a/README.md b/README.md index 16f3d7a..ee36f38 100755 --- a/README.md +++ b/README.md @@ -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 diff --git a/restore.sh b/restore.sh index ab45483..15b7929 100755 --- a/restore.sh +++ b/restore.sh @@ -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..." - sudo apt -y install binutils - mkdir tmp - cd tmp - apt download -o=dir::cache=. libcurl3 - ar x libcurl3* 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 .. + 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 + 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 + else + sudo apt -y install libzip4 + fi } # --- MAIN SCRIPT STARTS HERE ---