Created
September 11, 2011 09:32
-
-
Save mmorton/1209392 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/bash | |
if [ .$1. == .. ]; then | |
echo "USAGE: $0 [product name]" | |
exit 1 | |
fi | |
PRODUCT=argos-$1 | |
echo | |
echo "*** Setup and Build utility for $1 ***" | |
echo | |
if [ ! -d products/$PRODUCT ]; then | |
echo | |
echo "******* ERROR *******" | |
echo "'products/$PRODUCT' does not exist." | |
echo "This utility should be run from the gobiplatform root," | |
echo "where \gobi-sdk and \products are subdirectories." | |
echo | |
exit 1 | |
fi | |
echo "*******************************" | |
echo "Building Argos SDK" | |
echo "*******************************" | |
pushd argos-sdk | |
build/release.sh | |
if [ "$?" -ne "0" ]; then | |
popd | |
exit $? | |
fi | |
popd | |
echo "*******************************" | |
echo "Building Product: $PRODUCT" | |
echo "*******************************" | |
pushd products/$PRODUCT | |
build/release.sh | |
if [ "$?" -ne "0" ]; then | |
popd | |
exit $? | |
fi | |
popd | |
echo "*******************************" | |
echo "Deploying Product: $PRODUCT" | |
echo "*******************************" | |
if [ -d deploy/$PRODUCT ]; then | |
rm -rf deploy/$PRODUCT | |
fi | |
mkdir -p deploy/$PRODUCT | |
cp -r argos-sdk/deploy/* deploy/$PRODUCT | |
cp -r products/$PRODUCT/deploy/* deploy/$PRODUCT | |
echo "*******************************" | |
echo "Done" | |
echo "*******************************" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment