Skip to content

Instantly share code, notes, and snippets.

@kondors1995
Created September 30, 2018 05:06
Show Gist options
  • Save kondors1995/4918a06cf20c32999adade43c29eb120 to your computer and use it in GitHub Desktop.
Save kondors1995/4918a06cf20c32999adade43c29eb120 to your computer and use it in GitHub Desktop.
Rom builder
#!/bin/bash
# Bash Color
green='\033[01;32m'
red='\033[01;31m'
blink_red='\033[05;31m'
restore='\033[0m'
THREADS=$(nproc --all)
export USE_CCACHE=1
. build/envsetup.sh
echo -e "${green}"
read -p "With Device to build? : " device
echo -e "${restore}"
lunch syberia_$device-userdebug
echo -e "${green}"
while read -p "Do you want to clean stuffs (y/n)? " cchoice
echo -e "${restore}"
do
case "$cchoice" in
n|N )
echo
echo
echo -e "${green}"
echo "---------------------"
echo "Building Dirty BUILD."
echo "---------------------"
echo -e "${restore}"
make installclean -j${THREADS}
make bacon -j${THREADS}
break
;;
y|Y )
echo -e "${red}"
echo "---------------------"
echo "---!!!Cleaning!!!----"
echo "---------------------"
make clean -j${THREADS}
echo
echo -e "${green}"
echo "---------------------"
echo "Building Clean Build"
echo "---------------------"
echo -e "${restore}"
echo
echo
make bacon -j${THREADS}
echo
break
;;
* )
echo -e "${red}"
echo "---------------------"
echo "--Invalid try again--"
echo "---------------------"
echo -e "${restore}"
;;
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment