Last active
December 12, 2018 03:05
-
-
Save growtopiajaw/918c3a9015aec92fae2c574ea8002a22 to your computer and use it in GitHub Desktop.
LineageOS 15.1 buildbot script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
#The MIT License | |
#Copyright (c) 2018 Growtopia Jaw | |
#Permission is hereby granted, free of charge, to any person obtaining a copy | |
#of this software and associated documentation files (the "Software"), to deal | |
#in the Software without restriction, including without limitation the rights | |
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
#copies of the Software, and to permit persons to whom the Software is | |
#furnished to do so, subject to the following conditions: | |
#The above copyright notice and this permission notice shall be included in | |
#all copies or substantial portions of the Software. | |
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
#THE SOFTWARE. | |
cd lineage151 | |
rm -rf out/* | |
export LC_ALL=C | |
export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4g" | |
prebuilts/sdk/tools/jack-admin start-server | |
source build/envsetup.sh | |
lunch lineage_riva-userdebug | |
mkdir -p /home/growtopiajaw/lineage151/out/target/product/riva/obj_arm/ | |
mkdir -p /home/growtopiajaw/lineage151/out/target/product/riva/obj/ | |
cp -r vendor/xiaomi/riva/proprietary/lib /home/growtopiajaw/lineage151/out/target/product/riva/obj_arm/ | |
cp -r vendor/xiaomi/riva/proprietary/lib /home/growtopiajaw/lineage151/out/target/product/riva/obj/ | |
make -j4 "$B_TYPE" | |
cd ~/out | |
xz -v "$B_IMG" | |
mkdir "build-$G_C_DATE" | |
mv "$B_IMG_XZ" "build-$G_C_DATE" | |
gdrive upload --recursive --delete "build-$G_C_DATE" | |
gdrive sync upload riva_build_log "$G_F_ID" | |
sudo shutdown |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#The MIT License | |
#Copyright (c) 2018 Growtopia Jaw | |
#Permission is hereby granted, free of charge, to any person obtaining a copy | |
#of this software and associated documentation files (the "Software"), to deal | |
#in the Software without restriction, including without limitation the rights | |
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
#copies of the Software, and to permit persons to whom the Software is | |
#furnished to do so, subject to the following conditions: | |
#The above copyright notice and this permission notice shall be included in | |
#all copies or substantial portions of the Software. | |
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
#THE SOFTWARE. | |
logfile "riva_build_log/$L_NAME" | |
logfile flush 1 | |
log on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
#The MIT License | |
#Copyright (c) 2018 Growtopia Jaw | |
#Permission is hereby granted, free of charge, to any person obtaining a copy | |
#of this software and associated documentation files (the "Software"), to deal | |
#in the Software without restriction, including without limitation the rights | |
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
#copies of the Software, and to permit persons to whom the Software is | |
#furnished to do so, subject to the following conditions: | |
#The above copyright notice and this permission notice shall be included in | |
#all copies or substantial portions of the Software. | |
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
#THE SOFTWARE. | |
## make sure there is no variable with below names | |
unset B_TYPE | |
unset B_IMG | |
unset B_IMG_XZ | |
## configuration | |
S_NAME="LineageOS 15.1" ## session name | |
L_B_NAME="riva_full_build.txt" ## log base name | |
export B_TYPE="vendorimage" ## build type | |
export B_IMG="vendor.img" ## build image name | |
export B_IMG_XZ="$B_IMG".xz ## build image name with .xz extension | |
export G_F_ID="19MuJvwo9Bi-UaN66YQtFQ601Ni6PqUil" ## gdrive log folder id | |
## log naming | |
G_L_B_NAME=${L_B_NAME%.*} ## get log base name | |
G_L_EXT=${L_B_NAME#*.} ## get log extension | |
export G_C_DATE=`date +%d-%m-%y` ## get current date and append it to log | |
L_NAME=${G_L_B_NAME}-${G_C_DATE}.${G_L_EXT} ## log base name + current date + log extension | |
## continue if directory exists | |
## if it doesn't exist, create new directory | |
if [[ -d log ]]; then | |
echo "Directory 'riva_build_log' exists. Proceeding..." | |
else | |
mkdir -p riva_build_log | |
fi | |
## start a new screen session with session name in detached state, start sub build script and log to $L_NAME | |
screen -c ./screen.conf -dmSL "$S_NAME" ./build.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment