Skip to content

Instantly share code, notes, and snippets.

@mmorton
Created September 11, 2011 09:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mmorton/1209392 to your computer and use it in GitHub Desktop.
Save mmorton/1209392 to your computer and use it in GitHub Desktop.
#!/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