#!/bin/bash # User Defined Stuff folder="/home/ArixElo/ssos" rom_name="ShapeShiftOS-2.7-Solosis-OFFICIAL-davinci"*.zip build_type="user" device_codename="davinci" use_brunch="bacon" user="ArixElo" OUT_PATH="$folder/out/target/product/${device_codename}" lunch="ssos" # Default you can change it ccache_location=/home/ArixElo/.ccache # Make Clean , options uncomment to chose # make_clean="yes" # make_clean="no" make_clean="installclean" # Rom being built ROM=${OUT_PATH}/${rom_name} # Telegram Stuff priv_to_me="/home/dump/configs/priv.conf" newpeeps="/home/dump/configs/arix.conf" cd "$folder" echo -e "\rBuild starting thank you for waiting" BLINK="https://ci.goindi.org/job/$JOB_NAME/$BUILD_ID/console" # Send message to TG read -r -d '' msg <Build Started ${lunch} for ${device_codename} Console log:- here Good Luck ! Hope it Boots ! Happy Building ! Visit goindi.org for more EOT sudo telegram-send --format html "${msg}" --config ${priv_to_me} --disable-web-page-preview sudo telegram-send --format html "${msg}" --config ${newpeeps} --disable-web-page-preview # Time to build if [ -d ${ccache_location} ] then echo "Ccache folder exists." else sudo chmod -R 777 ${ccache_location} echo "Made Ccache Folder " fi export CCACHE_EXEC=$(which ccache) export USE_CCACHE=1 export CCACHE_DIR=${ccache_location} ccache -M 75G export USER_BUILD_NO_CHANGELOG=1 source build/envsetup.sh if [ "$with_gapps" = "yes" ]; then export "$gapps_command"=true export TARGET_GAPPS_ARCH=arm64 fi if [ "$with_gapps" = "no" ]; then export "$gapps_command"=false fi # Clean build if [ "$make_clean" = "yes" ]; then rm -rf out echo -e "Clean Build"; fi if [ "$make_clean" = "installclean" ]; then rm -rf ${OUT_PATH} echo -e "Install Clean"; fi rm -rf ${OUT_PATH}/*.zip lunch ${lunch}_${device_codename}-${build_type} if [ "$use_brunch" = "yes" ]; then brunch ${device_codename} fi if [ "$use_brunch" = "no" ]; then make ${lunch} -j$(nproc --all) fi if [ "$use_brunch" = "bacon" ]; then make bacon -j$(nproc --all) fi if [ -f $ROM ]; then mkdir -p /home/dump/sites/goindi/downloads/${user}/${device_codename} cp $ROM /home/dump/sites/goindi/downloads/${user}/${device_codename} filename="$(basename $ROM)" LINK="https://download.goindi.org/${user}/${device_codename}/${filename}" size="$(du -h ${ROM}|awk '{print $1}')" mdsum="$(md5sum ${zip}|awk '{print $1}')" read -r -d '' priv <Download:- here Size:-
 ${size}
Md5:-
 ${mdsum}
EOT else read -r -d '' priv <Error Generated Check error:- here EOT fi sudo telegram-send --format html "$priv" --config ${priv_to_me} --disable-web-page-preview sudo telegram-send --format html "$priv" --config ${newpeeps} --disable-web-page-preview