-
Notifications
You must be signed in to change notification settings - Fork 0
/
create-zip
executable file
·43 lines (32 loc) · 993 Bytes
/
create-zip
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
set -e
PEAMIXM="https://github.com/ubports-dipper/xiaomi-dipper/releases/download/v22/ubuntu-touch-v22.PEAMIXM.zip"
PEAMIXMZIP="ubuntu-touch-v22.PEAMIXM.zip"
PEACNXM="https://github.com/ubports-dipper/xiaomi-dipper/releases/download/v22/ubuntu-touch-v22.PEACNXM.zip"
PEACNXMZIP="ubuntu-touch-v22.PEACNXM.zip"
if [ ! -e $(pwd)/${PEAMIXMZIP} ] && [ ! -e $(pwd)/${PEACNXMZIP} ]; then
echo "Getting ZIPs"
wget -c -O $PEAMIXMZIP $PEAMIXM
wget -c -O $PEACNXMZIP $PEACNXM
fi
echo "Unzipping"
echo "PEAMIXM ZIP"
unzip -o $PEAMIXMZIP -d peamixm/
echo "PEACNXM ZIP"
unzip -o $PEACNXMZIP -d peacnxm/
rm -f out/system.new.dat
echo "Copying system files"
echo "PEAMIXM"
cp out/* peamixm/
cp boot.img peamixm/firmware-update/
echo "PEACNXM"
cp out/* peacnxm/
cp boot.img peacnxm/firmware-update/
echo "Packing zip"
echo "Packing PEAMIXM"
cd $PWD/peamixm/
zip -r ubuntu-touch-v23.PEAMIXM.zip ./.
cd -
echo "Packing PEACNXM"
cd $PWD/peacnxm/
zip -r ubuntu-touch-v23.PEACNXM.zip ./.