-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·53 lines (37 loc) · 1.16 KB
/
build.sh
File metadata and controls
executable file
·53 lines (37 loc) · 1.16 KB
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
#!/bin/sh
#
# To run on windows use MSYS2 or gitbash.
# Some aditional packages may need installing.
# e.g. ar.exe
#
PATTERN="*_all.ipk"
CURRENT=`pwd`
TEMP=$(mktemp -d)
rm -f $CURRENT/$PATTERN # remove old ipk if exists
cp -a $CURRENT/. $TEMP
cd $TEMP
cd po
./updateallpo-multiOS.sh
cd ..
git_revision=`git rev-list HEAD --count`
git_hash=`git rev-parse HEAD`
cd meta
version_orig=`grep Version ./control/control`
# everything before the + sign
version_short=${version_orig%%+*}
version=`echo "$version_short" | cut -d ' ' -f 2`
version_updated="${version}+git${git_revision}+${git_hash:0:8}+${git_hash:0:10}-r0"
version_new="Version: ${version_updated}"
sed -i "s/\b${version_orig}/${version_new}/g" ./control/control
package=$(grep Package ./control/control|cut -d " " -f 2)
mkdir -p usr/lib/enigma2/python/Plugins/Extensions/PlutoTV
cp -ra ../src/. ./usr/lib/enigma2/python/Plugins/Extensions/PlutoTV
tar -cvzf data.tar.gz usr
cd control
tar -cvzf control.tar.gz ./control ./postrm
cd ..
mv ./control/control.tar.gz .
ar -r ../${package}_${version_updated}_all.ipk debian-binary control.tar.gz data.tar.gz
cd $CURRENT
cp $TEMP/$PATTERN $CURRENT
rm -rf $TEMP # clean up