| 1 |
#!/bin/sh |
| 2 |
set -e |
| 3 |
|
| 4 |
git clone https://github.com/neurolabusc/dcm_qa_asl data |
| 5 |
find data/ -name '.git*' | xargs rm -rf |
| 6 |
cd data |
| 7 |
|
| 8 |
if ! grep -q 'BSD 2-Clause License' LICENSE |
| 9 |
then |
| 10 |
cat >&2 <<-END |
| 11 |
error: test data's licensing terms look to have changed. |
| 12 |
Please examine the situation before going further. |
| 13 |
END |
| 14 |
exit 1 |
| 15 |
fi |
| 16 |
|
| 17 |
rm -rf $(ls -A | grep -vE "(In)") |
| 18 |
cd In/PASL2D/ |
| 19 |
|
| 20 |
readonly CHANGELOG="../../../changelog" |
| 21 |
if [ ! -r "$CHANGELOG" ] |
| 22 |
then |
| 23 |
cat >&2 <<-END |
| 24 |
error: debian/changelog not found. |
| 25 |
Please run from the debian/ directory. |
| 26 |
END |
| 27 |
fi |
| 28 |
|
| 29 |
tarball="$( \ |
| 30 |
dpkg-parsechangelog --file "$CHANGELOG" \ |
| 31 |
| awk '/^Source:/ {print $2}' \ |
| 32 |
)_$( \ |
| 33 |
dpkg-parsechangelog --file "$CHANGELOG" \ |
| 34 |
| awk '/^Version:/ {print $2}' \ |
| 35 |
| cut -f1 -d- \ |
| 36 |
).orig-debian-tests-data.tar.gz" |
| 37 |
|
| 38 |
tar --owner=root --group=root --mode=a+rX -cvzSf "$tarball" "3_pasl_2d" |
| 39 |
|
| 40 |
mv "$tarball" ../../.. |
| 41 |
cd ../../.. |
| 42 |
test -r "$tarball" |
| 43 |
rm -rf data/ |
| 44 |
echo "Now move $tarball next to the new upstream tarball and gbp import it as usual" |