-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbld_release.sh.old
executable file
·65 lines (49 loc) · 1.07 KB
/
bld_release.sh.old
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/sh
#
# This script is used to generate a new release
#
# Guy Turcotte, January 2021
#
if [ "$1" = "" ]
then
echo "Usage: $0 version type"
echo "type = 6, 10, 6plus"
return 1
fi
folder="release-$1-inkplate_$2"
if [ -f "$folder.zip" ]
then
echo "File $folder.zip already exist!"
return 1
fi
mkdir "$folder"
cp .pio/build/inkplate_$2_release/bootloader.bin bin
cp .pio/build/inkplate_$2_release/partitions.bin bin
cp .pio/build/inkplate_$2_release/firmware.bin bin
cp -r bin "$folder"
cp -r SDCard "$folder"
if [ -f "$folder/SDCard/books_dir.db" ]
then
rm "$folder/SDCard/books_dir.db"
fi
if [ -f "$folder/SDCard/last_book.txt" ]
then
rm "$folder/SDCard/last_book.txt"
fi
if [ -d "$folder/SDCard/books/temp" ]
then
rm -rf "$folder/SDCard/books/temp"
fi
rm $folder/SDCard/books/*.locs
rm $folder/SDCard/books/*.pars
rm $folder/SDCard/books/*.toc
rm $folder/SDCard/config.txt
cd doc
./gener.sh
cd ..
cp "doc/USER GUIDE.pdf" "$folder"
cp "doc/INSTALL.pdf" "$folder"
cp adjust_size.sh "$folder"
zip -r "$folder.zip" "$folder"
rm -rf "$folder"
echo "Completed."