Skip to content

Instantly share code, notes, and snippets.

@checko
Created December 25, 2013 03:10
Show Gist options
  • Save checko/8119870 to your computer and use it in GitHub Desktop.
Save checko/8119870 to your computer and use it in GitHub Desktop.
nightly test build
#!/bin/bash
cd /home/charles-chang
. .profile
# if exist, last build failed. do nothing.
cd nightly
if [ "$?" = "0" ]; then
exit 1
fi
mkdir nightly
if [ "$?" -ne "0" ]; then
touch mkdirfail
exit 1
fi
cd nightly
if [ "$?" -ne "0" ]; then
touch cdfail
exit 1
fi
repo init -u git://robot/opensourcecsr/android-prima2/manifests/android.git -b speedsnail 2>&1 | tee repoinitlog
if [ "${PIPESTATUS[0]}" -ne "0" ]; then
touch repoinitfail
exit 1
fi
repo sync 2>&1 | tee synclog
if [ "${PIPESTATUS[0]}" -ne "0" ]; then
touch syncfail
exit 1
fi
make 2>&1 | tee log1
if [ "${PIPESTATUS[0]}" -ne "0" ]; then
touch level1fail
exit 1
fi
cd android
make showcommands update-api 2>&1 | tee log2.0
if [ "${PIPESTATUS[0]}" -ne "0" ]; then
touch updateapifail
exit 1
fi
make showcommands 2>&1 | tee log2
if [ "${PIPESTATUS[0]}" -ne "0" ]; then
touch androidfaile
exit 1
fi
cd ..
make android 2>&1 | tee log3
if [ "${PIPESTATUS[0]}" -ne "0" ]; then
touch makeandroidfail
exit 1
fi
echo Success!
mv log1 android/log2 log3 /home/charles-chang/
cd ../
rm -rf nightly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment