2020-09-18 04:17:57 +02:00
|
|
|
#!/bin/bash
|
2021-03-05 04:27:37 +01:00
|
|
|
trap 'echo "Exiting..."' EXIT
|
|
|
|
|
2020-11-23 07:40:44 +01:00
|
|
|
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig
|
2020-09-18 04:17:57 +02:00
|
|
|
|
2021-03-05 04:27:37 +01:00
|
|
|
echo "This script can be used to compile tools used by iOS-OTA-Downgrader for Linux"
|
2020-09-18 04:17:57 +02:00
|
|
|
|
2021-05-01 08:21:29 +02:00
|
|
|
Clone() {
|
2020-09-18 04:17:57 +02:00
|
|
|
git clone $3 https://github.com/$1/$2
|
|
|
|
}
|
|
|
|
|
2021-05-01 08:21:29 +02:00
|
|
|
Compile() {
|
2021-03-05 04:27:37 +01:00
|
|
|
[[ $3 == --recursive ]] && Clone $1 $2 $3 || Clone $1 $2
|
2020-09-18 04:17:57 +02:00
|
|
|
cd $2
|
2021-03-05 04:27:37 +01:00
|
|
|
[[ -e autogen.sh ]] && ./autogen.sh $3 $4
|
2020-09-18 04:17:57 +02:00
|
|
|
make
|
|
|
|
sudo make install
|
|
|
|
cd ..
|
|
|
|
}
|
|
|
|
|
|
|
|
. /etc/os-release
|
2021-03-05 04:27:37 +01:00
|
|
|
if [[ $UBUNTU_CODENAME != "focal" ]]; then
|
|
|
|
echo "This compile script supports Ubuntu 20.04 only"
|
|
|
|
exit 1
|
2020-09-18 04:17:57 +02:00
|
|
|
fi
|
|
|
|
|
2021-03-05 04:27:37 +01:00
|
|
|
sudo apt update
|
|
|
|
sudo apt install -y libtool automake g++ python-dev libzip-dev libcurl4-openssl-dev cmake libssl-dev libusb-1.0-0-dev libreadline-dev libbz2-dev libpng-dev pkg-config git
|
|
|
|
|
2020-09-18 04:17:57 +02:00
|
|
|
Compile matteyeux partial-zip #partialzip_linux
|
|
|
|
Compile lzfse lzfse
|
|
|
|
Compile libimobiledevice libplist
|
|
|
|
Compile libimobiledevice libusbmuxd
|
|
|
|
Compile libimobiledevice libimobiledevice
|
|
|
|
Compile LukeZGD libirecovery #irecovery_linux
|
2021-03-05 04:27:37 +01:00
|
|
|
Compile LukeZGD libgeneral --enable-static --disable-shared
|
|
|
|
Compile LukeZGD libfragmentzip --enable-static --disable-shared
|
|
|
|
Compile LukeZGD img4tool --enable-static --disable-shared
|
2020-09-18 04:17:57 +02:00
|
|
|
Compile tihmstar tsschecker --recursive #tsschecker_linux
|
2021-03-05 04:27:37 +01:00
|
|
|
Compile LukeeGD futurerestore --recursive #futurerestore2_linux
|
2020-09-18 04:17:57 +02:00
|
|
|
|
|
|
|
mkdir tools
|
|
|
|
cp partial-zip/partialzip tools/partialzip_linux
|
|
|
|
cp libirecovery/tools/irecovery tools/irecovery_linux
|
|
|
|
cp tsschecker/tsschecker/tsschecker tools/tsschecker_linux
|
|
|
|
cp futurerestore/futurerestore/futurerestore tools/futurerestore2_linux
|
2021-03-05 04:27:37 +01:00
|
|
|
|
|
|
|
echo "Done"
|