Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Initial commit of complete rebasing of bot.
Now uses envsetup from the android build system for certain calls and information about vendor/target/etc. This allows it to be much more scalable and portable to other vendors. Code is insanely messy right now, but I need to get some sort of commit history going on this, for my memories sake.
- Loading branch information
Showing
5 changed files
with
102 additions
and
59 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
upload | ||
test.sh |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,49 @@ | ||
#!/bin/bash | ||
|
||
BUILD_ROOT=~/aokp | ||
TARGET_VENDOR=$(echo $TARGET_PRODUCT | cut -f1 -d '_') | ||
VER=$(cat vendor/$TARGET_VENDOR/products/common_versions.mk | grep "TARGET_PRODUCT" | cut -f3 -d '_' | cut -f1 -d ' ') | ||
ZIP=$(find $(echo $ANDROID_PRODUCT_OUT) -maxdepth 1 -name $TARGET_VENDOR_*-squished.zip) | ||
OUTD=$(echo $(cd ../test && pwd)) | ||
#ZIP=/home/khasmek/Android/AOKP/out/target/product/toro/aokp_toro_build-23-squished.zip | ||
|
||
# $1 should be lunch combo | ||
# $2 should be device name | ||
|
||
BUILD=$(cat $BUILD_ROOT/vendor/aokp/products/common_versions.mk | grep "TARGET_PRODUCT" | cut -f3 -d '_' | cut -f1 -d ' ') | ||
NAME=aokp_$2_$BUILD.zip | ||
|
||
# build | ||
BUILD_ROOT=`pwd` | ||
cd $BUILD_ROOT | ||
. build/envsetup.sh | ||
lunch $1 | ||
#make -j`grep 'processor' /proc/cpuinfo | wc -l` otapackage | ||
make -j9 otapackage bacon | ||
ZIP=$(find $BUILD_ROOT/out/target/product/$2/ -maxdepth 1 -name aokp_$2*-squished.zip) | ||
cp $ZIP /home/roman/upload/$NAME | ||
|
||
make -j9 bacon | ||
#ZIP=$(find $(echo $ANDROID_PRODUCT_OUT) -maxdepth 1 -name $TARGET_VENDOR_$2*-squished.zip) | ||
#OUTD=$(echo $(cd ../test && pwd)) | ||
# clean out of previous zip | ||
OUTZ=$(echo $TARGET_PRODUCT)_$VER.zip | ||
rm -rf $OUTD/$OUTZ | ||
#mkdir $OUTD | ||
#NAME=aokp_$2_$BUILD.zip | ||
cp $ZIP $OUTD/$OUTZ | ||
|
||
# finish | ||
echo "$2 build complete" | ||
|
||
# md5sum list | ||
cd $OUTD | ||
#md5sum aokp_* | ||
md5sum $OUTZ | cat >> md5sum | ||
# upload | ||
cd $BUILD_ROOT | ||
cd ../upload | ||
|
||
# | ||
# this is kind of dirty nasty, but create directories, then upload | ||
# | ||
|
||
sftp goo <<EOF | ||
mkdir ./roms_html/$2 | ||
quit | ||
EOF | ||
|
||
sftp inffy <<EOF | ||
mkdir /home/teamkang/public_html/roms/$2 | ||
quit | ||
EOF | ||
|
||
sftp maddler <<EOF | ||
mkdir /home/teamkang/www/$2 | ||
quit | ||
EOF | ||
|
||
rsync -avP -e "ssh" ./$NAME goo:/home/roman/roms_html/$2/$NAME & | ||
rsync -avP -e "ssh" ./$NAME inffy:/home/teamkang/public_html/roms/$2/$NAME & | ||
rsync -avP -e "ssh" ./$NAME maddler:/home/teamkang/www/$2/$NAME & | ||
echo "checking on upload reference file" | ||
|
||
BUILDBOT=$BUILD_ROOT/vendor/$TARGET_VENDOR/bot/ | ||
cd $BUILDBOT | ||
if test -x upload ; then | ||
echo "Upload file exists, executing now" | ||
cp upload $OUTD | ||
cd $OUTD | ||
./upload $2 && rm upload | ||
else | ||
echo "No upload file found (or set to +x), build complete." | ||
fi | ||
|
||
cd $BUILT_ROOT |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
|
||
TARGET_VENDOR=$(echo $TARGET_PRODUCT | cut -f1 -d '_') | ||
# this needs to be fixed | ||
#VER=$(cat ../products/common_versions.mk | grep "TARGET_PRODUCT" | cut -f3 -d '_' | cut -f1 -d ' ') | ||
VER=$(cat vendor/$TARGET_VENDOR/products/common_versions.mk | grep "TARGET_PRODUCT" | cut -f3 -d '_' | cut -f1 -d ' ') | ||
|
||
# $1 should be lunch combo | ||
# $2 should be device name | ||
|
||
# build | ||
BUILD_ROOT=`pwd` | ||
cd $BUILD_ROOT | ||
. build/envsetup.sh | ||
lunch $1 | ||
#make -j`grep 'processor' /proc/cpuinfo | wc -l` otapackage | ||
make -j9 bacon | ||
ZIP=$(find $(echo $ANDROID_PRODUCT_OUT) -maxdepth 1 -name $TARGET_VENDOR_$2*-squished.zip) | ||
OUTD=$(echo $(cd ../test && pwd)) | ||
rm -rf $OUTD | ||
mkdir $OUTD | ||
#NAME=aokp_$2_$BUILD.zip | ||
cp $ZIP $OUTD/$(echo $TARGET_PRODUCT)_$VER.zip | ||
|
||
# finish | ||
echo "$2 build complete" | ||
# upload | ||
echo "checking on upload reference file" | ||
|
||
BUILDBOT=vendor/$TARGET_VENDOR/bot/ | ||
cd $BUILDBOT | ||
if test -x upload ; then | ||
echo "Upload file exists, executing now" | ||
cp upload $OUTD | ||
cd $OUTD | ||
./upload $2 && rm upload | ||
else | ||
echo "No upload file found (or set to +x), build complete." | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,30 @@ | ||
#!/bin/bash | ||
|
||
BUILD_ROOT=~/aokp | ||
BUILDBOT=~/buildbot | ||
|
||
# setup folders | ||
rm -R ../upload | ||
mkdir ../upload | ||
#OUTD=$(echo $(cd ../test && pwd)) | ||
#rm -R $OUTD | ||
#mkdir $OUTD | ||
|
||
# clean | ||
BUILD_ROOT=`pwd` | ||
echo "$BUILD_ROOT" | ||
cd $BUILD_ROOT | ||
repo sync | ||
#repo sync | ||
. build/envsetup.sh | ||
|
||
if [ $1 = "clean" ]; then | ||
if [ "$1" = "clean" ]; then | ||
make clean | ||
fi | ||
|
||
# | ||
# build_device <lunch combo> <device name> | ||
# | ||
cd $BUILDBOT | ||
./build_device.sh 7 maguro | ||
./build_device.sh 8 toro | ||
./build_device.sh 5 crespo | ||
./build_device.sh 6 crespo4g | ||
./build_device.sh 9 p4wifi | ||
./build_device.sh 10 tenderloin | ||
./build_device.sh 11 vivow | ||
./build_device.sh 12 p4 | ||
./build_device.sh 13 p4vzw | ||
./build_device.sh 10 tenderloin | ||
./build_device.sh 11 vivow | ||
./build_device.sh 14 stingray | ||
./build_device.sh 15 wingray | ||
./build_device.sh 16 supersonic | ||
./build_device.sh 17 inc | ||
./build_device.sh 18 vzwtab | ||
#cd $BUILDBOT | ||
#./build_device.sh 8 toro | ||
./vendor/aokp/bot/build_device.sh 8 toro | ||
./vendor/aokp/bot/build_device.sh 9 p4wifi | ||
|
||
cd ~/upload | ||
#cd $OUTD | ||
|
||
# done! | ||
md5sum aokp_* | ||
#md5sum aokp_* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
# | ||
# this is kind of dirty nasty, but create directories, then upload | ||
# | ||
|
||
VER=$(cat ../AOKP/vendor/aokp/products/common_versions.mk | grep "TARGET_PRODUCT" | cut -f3 -d '_' | cut -f1 -d ' ') | ||
NAME=aokp_$1_$VER.zip | ||
mkdir -p ~/Android/test1/$1 | ||
cd ~/Android/test/ | ||
rsync -aHS ./$NAME ~/Android/test1/$1/$NAME & |