Skip to content

Commit

Permalink
build.sh: Refractor version logic
Browse files Browse the repository at this point in the history
While at it remove unused variables
  • Loading branch information
kondors1995 committed Sep 30, 2023
1 parent 09dbf0b commit b47cf9b
Showing 1 changed file with 14 additions and 21 deletions.
35 changes: 14 additions & 21 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,23 @@ clear
# Resources
export CLANG_PATH=~/tc/neutron-clang/bin
export PATH=${CLANG_PATH}:${PATH}
#export CROSS_COMPILE=${CLANG_PATH}/aarch64-linux-gnu-
#export CROSS_COMPILE_ARM32=${CLANG_PATH}/arm-linux-gnueabi-
export THINLTO_CACHE=~/ltocache/
DEFCONFIG="raphael_defconfig"

# Kernel Details
VER="R4.2-SYB"
REV="R5.1"
EDITION="SYB"
VER="$REV"-"$EDITION"

# Vars
BASE_AK_VER="SOVIET-STAR-K20P-"
DATE=`date +"%Y%m%d-%H%M"`
AK_VER="$BASE_AK_VER$VER"
ZIP_NAME="$AK_VER"-"$DATE"
export ARCH=arm64
export SUBARCH=arm64
export KBUILD_BUILD_USER=NATO66613
export KBUILD_BUILD_HOST=KREMLIN

# Paths
KERNEL_DIR=`pwd`
Expand Down Expand Up @@ -48,29 +58,13 @@ function make_zip {
cd $KERNEL_DIR
}


DATE_START=$(date +"%s")


echo -e "${green}"
echo "-----------------"
echo "Making Kernel:"
echo "-----------------"
echo -e "${restore}"


# Vars
BASE_AK_VER="SOVIET-STAR-K20P-"
DATE=`date +"%Y%m%d-%H%M"`
AK_VER="$BASE_AK_VER$VER"
ZIP_NAME="$AK_VER"-"$DATE"
#export LOCALVERSION=~`echo $AK_VER`
#export LOCALVERSION=~`echo $AK_VER`
export ARCH=arm64
export SUBARCH=arm64
export KBUILD_BUILD_USER=NATO66613
export KBUILD_BUILD_HOST=KREMLIN

echo

while read -p "Do you want to clean stuffs (y/n)? " cchoice
Expand Down Expand Up @@ -114,7 +108,6 @@ case "$dchoice" in
esac
done


echo -e "${green}"
echo "-------------------"
echo "Build Completed in:"
Expand All @@ -124,4 +117,4 @@ echo -e "${restore}"
DATE_END=$(date +"%s")
DIFF=$(($DATE_END - $DATE_START))
echo "Time: $(($DIFF / 60)) minute(s) and $(($DIFF % 60)) seconds."
echo
echo

0 comments on commit b47cf9b

Please sign in to comment.