Skip to content

Instantly share code, notes, and snippets.

@cvvergara
Last active May 19, 2017 16:46
Show Gist options
  • Save cvvergara/e439e9ca00b1acebb68f674b5610910f to your computer and use it in GitHub Desktop.
Save cvvergara/e439e9ca00b1acebb68f674b5610910f to your computer and use it in GitHub Desktop.
Yet another run.sh I use for 2.5
#!/bin/bash
set -e
if [ -z $1 ]; then
echo "version missing"
exit 1;
fi
VERSION=$1
function test_compile {
echo ------------------------------------
echo ------------------------------------
echo Compiling with $1
echo ------------------------------------
sudo update-alternatives --set gcc /usr/bin/gcc-$1
cd build/
#cmake ..
# Release RelWithDebInfo MinSizeRel Debug
cmake -DDOC_USE_BOOTSTRAP=ON -DWITH_DOC=ON -DBUILD_DOXY=ON -DCMAKE_BUILD_TYPE=Debug ..
#to get the old style of documentation
#cmake -DWITH_DOC=ON -DBUILD_DOXY=ON -DCMAKE_BUILD_TYPE=Release ..
make doxy
make doc
make
sudo make install
cd ..
#tools/testers/algorithm-tester.pl -alg dijkstra
# Verify with git diff that signatures did not change
sh tools/release-scripts/get_signatures.sh $VERSION ____sigs_routing____ sql/sigs
cp build/sql/pgrouting--*.sql tools/sql-update-scripts
if [[ $(git status | grep 'pgrouting--') ]]; then
echo "**************************************************"
echo " WARNING"
echo "the signatures changed, copying generated files"
echo "Plese verify the changes are minimal"
echo "**************************************************"
git diff
fi
#tools/testers/algorithm-tester.pl -documentation
#cd build
#rm -rf doc/*
#make doc
#cd ..
#tools/testers/algorithm-tester.pl
dropdb --if-exists ___pgr___test___
createdb ___pgr___test___
#sh ./tools/testers/pg_prove_tests.sh vicky
dropdb ___pgr___test___
#tools/testers/update-tester.sh
}
#test_compile 4.4
#rm -rf build/*
test_compile 5
#rm -rf build/*
#test_compile 4.9
#rm -rf build/*
#test_compile 4.6
#sudo rm -f /usr/lib/postgresql/9.3/lib/libpgrouting-2.5.so
#sudo rm -f /usr/share/postgresql/9.3/extension/pgrouting*2.5.0*
#rm -rf build/*
#test_compile 4.8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment