summaryrefslogtreecommitdiff
path: root/contrib/gana.sh
blob: e6fe32e0adb69af5910a9f1918193f894d7fdc0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
# Helper script to update to latest GANA
# Run from exchange/ main directory.
set -eu

git submodule update --init

cd contrib/gana
git pull origin master
cd ../..

# Generate taler-error-codes.h in gana and copy it to
# src/include/taler_error_codes.h
cd contrib/gana/gnu-taler-error-codes
make
cd ../../..
if ! diff contrib/gana/gnu-taler-error-codes/taler_error_codes.h src/include/taler_error_codes.h > /dev/null
then
  echo "Deploying latest new GANA database..."
  cp contrib/gana/gnu-taler-error-codes/taler_error_codes.h src/include/taler_error_codes.h
  cp contrib/gana/gnu-taler-error-codes/taler_error_codes.c src/util/taler_error_codes.c
else
  echo "GANA database already up-to-date"
fi