forked from sakuramilk/sc06d_kernel_ics
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-release.sh
More file actions
executable file
·56 lines (45 loc) · 1.06 KB
/
build-release.sh
File metadata and controls
executable file
·56 lines (45 loc) · 1.06 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
54
55
#!/bin/bash
KERNEL_DIR=$PWD
RAMDISK_NAME=sc06d_boot_ramdisk
if [ -z ../$RAMDISK_NAME ]; then
echo "error: $RAMDISK_NAME directory not found"
exit -1
fi
cd ../$RAMDISK_NAME
if [ ! -n "`git status | grep clean`" ]; then
echo "error: $RAMDISK_NAME is not clean"
exit -1
fi
RAMDISK_DIR=$PWD
cd $KERNEL_DIR
read -p "select build type? [(r)elease/(n)ightly] " BUILD_TYPE
if [ "$BUILD_TYPE" = 'release' -o "$BUILD_TYPE" = 'r' ]; then
export RELEASE_BUILD=y
else
unset RELEASE_BUILD
fi
# create release dir_
RELEASE_DIR=../release/`date +%Y%m%d`
if [ ! -d $RELEASE_DIR ]; then
mkdir -p $RELEASE_DIR
fi
# build for samsung boot.img
cd $RAMDISK_DIR
git checkout samsung-ics
cd $KERNEL_DIR
bash ./build-bootimg-samsung.sh a $1
if [ $? != 0 ]; then
echo 'error: samsung boot.img build fail'
exit -1
fi
cp -v ./out/SAM/bin/SC06D* $RELEASE_DIR/
# build for aosp boot.img
cd $RAMDISK_DIR
git checkout cm-ics
cd $KERNEL_DIR
bash ./build-bootimg-aosp.sh a $1
if [ $? != 0 ]; then
echo 'error: aosp boot.img build fail'
exit -1
fi
cp -v ./out/AOSP/bin/SC06D* $RELEASE_DIR/