-
-
Notifications
You must be signed in to change notification settings - Fork 45
/
requirements.sh
26 lines (19 loc) · 1.08 KB
/
requirements.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
# Those are the only partitions we need for building properties
declare PARTITIONS2EXTRACT=("product" "vendor" "system" "system_ext")
[[ $(type -t "print_message") != function ]] && . ./util_functions.sh
# Install required packages and libs
install_packages "zip" "p7zip" "dos2unix" "aria2"
# Check whethever python was installed, TODO: Improve install_packages function.
if ! command -v python3.12 >/dev/null 2>&1; then
install_packages "python3.12"
fi
# Check if python3.12 pip module installed
python3.12 -m pip -V &>/dev/null || print_message "Could not find pip module in python3.12, To fix this issue simply aria2c and install https://bootstrap.pypa.io/get-pip.py from python3.12" error
# Check if payload_dumper is available
payload_dumper -h &>/dev/null || print_message "Could not find payload_dumper executable. Install it using python3.12 -m pip install payload_dumper/" error
# Install imjtool if not already installed
while [ ! -f "./imjtool" ]; do
print_message "./imjtool not found. Installing imjtool…" info
aria2c "http://newandroidbook.com/tools/imjtool"
done