Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Download an OpenShift snapshot and update the repository with changes made on the server. Don't forget to push afterwards!
set -e
set -x
cd `dirname $0`
NAME=`basename $DIR`
SNAPSHOT_TARBALL=`mktemp --tmpdir "$NAME-XXX.tar.gz"`
rhc snapshot-save -a "$NAME" --filepath "$SNAPSHOT_TARBALL"
tar --wildcards --strip-components=5 -xvf "$SNAPSHOT_TARBALL" './*/app-root/runtime/repo/php'
git add -A php
git commit -m "Updated from snapshot"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment