Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 46 lines (38 sloc) 0.932 kB
#!/bin/bash
# Simple script to update the test data.
if test -z "$1"
then
echo "usage: $0 <git hash>"
echo "e.g. : $0 096fg5"
exit
fi
VERSION=$1
echo "Updating test data"
if [ ! -d ../inasafe_data ]
then
# check the repo out since it does not exist
pushd .
cd ..
git clone --depth 1 git://github.com/AIFDR/inasafe_data.git inasafe_data
popd
fi
pushd .
cd ../inasafe_data
git clean -f -d
git reset --hard
git fetch
# Checkout desired version
# Use unnecessary force because
# local files might have been modified
# and can block the checkout. Issue
# https://github.com/AIFDR/inasafe/issues/313
#
# However this is dangerous as it will kill
# any new file put under git in the detached branch.
# More scary, any file added (but not committed or
# not under git) under master will also disappear. Why?
echo "Setting test data to revision: $VERSION"
git checkout --force $VERSION
EXITCODE=$?
popd
exit $EXITCODE
Jump to Line
Something went wrong with that request. Please try again.