forked from fukiame/kernel_builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
env
35 lines (24 loc) · 1.03 KB
/
env
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
#!/bin/bash
#
# config and common vars
export maindir="$(pwd)"
export outside="${maindir}/.."
#
export ARCH="arm64"
export SUBARCH="arm64"
export KBUILD_BUILD_USER="nijuugo-ji"
export KBUILD_BUILD_HOST="telegram-de"
export defconfig="selene_defconfig"
export zipper_repo=fukiame/AnyKernel3-niigo
export zipper_branch=selene-old
export out_image="${maindir}/out/arch/${ARCH}/boot/Image.gz-dtb"
export out_dtb="${maindir}/out/arch/${ARCH}/boot/dts/mediatek/mt6768.dtb"
export out_dtbo="${maindir}/out/arch/${ARCH}/boot/dtbo.img"
export zipper="${outside}/zipper"
#
export defconfig_file="${maindir}/arch/${ARCH}/configs/${defconfig}"
export kernel_head="$(git log --pretty=format:'%h' -1)"
export kernel_name=$(cat "${defconfig_file}" | grep "CONFIG_LOCALVERSION=" | sed 's/CONFIG_LOCALVERSION="-*//g' | sed 's/"*//g' )
export kernel_ver="4.14.$(cat "${maindir}/Makefile" | grep "SUBLEVEL =" | sed 's/SUBLEVEL = *//g')"
export TIME=$(date +"%y%m%d-%H%M")
export zip_name="${maindir}/${kernel_name}${SUFFIX}-${TIME}-${kernel_head}-${kernel_ver}.zip"