Skip to content

Instantly share code, notes, and snippets.

@jdob
Created January 29, 2013 15:09
Show Gist options
  • Select an option

  • Save jdob/4664951 to your computer and use it in GitHub Desktop.

Select an option

Save jdob/4664951 to your computer and use it in GitHub Desktop.
#!/bin/sh
DEPLOY_DIR="/var/www/html/pulp-jdob"
BUILD_DIR="/tmp/tito"
# -- functions ----------------------------------------
clean()
{
echo "== Cleaning Deployment and Previous Build =="
rm -rf $DEPLOY_DIR/*
rm -rf $BUILD_DIR/*
}
build()
{
echo "== Building RPMs =="
for r in pulp/platform pulp/builtins pulp_rpm pulp_puppet
do
pushd $r
tito build --rpm
popd
done
}
okaara()
{
echo "== Building Okaara =="
pushd /home/jdob/vault/code/okaara
tito build --rpm
popd
}
deploy()
{
echo "== Deploying and Creating Repository =="
COMPS_LOCATION=`pwd`/pulp/comps.xml
cd $BUILD_DIR/noarch
cp * $DEPLOY_DIR
cd $DEPLOY_DIR
createrepo . -g $COMPS_LOCATION
}
# -- execution ----------------------------------------
clean
build
okaara
deploy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment