forked from KangBangKreations/KangBanged-7x30
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild_kernel.sh
51 lines (48 loc) · 950 Bytes
/
build_kernel.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
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
#!/usr/bin/env bash
function check_result {
if [ "0" -ne "$?" ]
then
echo $1
exit 1
fi
}
if [ -z "$DEFCONFIG" ]
then
if [ -z "$1" ]
then
echo DEFCONFIG not specified
exit 1
fi
export DEFCONFIG=$1
fi
echo cloning AnyKernel...
rm -rf ~/AnyKernel
git clone git://github.com/yanniks/AnyKernel.git ~/AnyKernel
echo done!
echo exporting some functions...
export ARCH=arm
echo done!
echo cleaning...
make clean
check_result "Cleaning failed."
echo done!
echo start compiling for $DEFCONFIG ...
make $DEFCONFIG_defconfig
check_result "Setting defconfig failed."
make
check_result "Build failed."
echo done!
echo creating update zip...
bash zip
check_result "Creating zip failed."
echo done!
echo ""
if [ "$RELEASE" = "true" ]
then
echo releasing...
mv ~/kernel-*.zip /var/www/kernel
echo released new kernel binary: http://yauniks.dynvpn.de/$ZIPFILENAME
check_result "Release failed."
else
echo everything done!
fi