aboutsummaryrefslogtreecommitdiff
path: root/contrib/gana-update.sh
blob: 8fcf18852821da1da83cf409de715f3f60664053 (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
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
# Helper script to recompute error codes based on submodule
# Run from exchange/ main directory.
set -eu

# 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 ../../..
for n in taler_error_codes.c
do
    if ! diff contrib/gana/gnu-taler-error-codes/${n} src/util/${n} > /dev/null
    then
        cp contrib/gana/gnu-taler-error-codes/$n src/util/$n
    fi
done
for n in taler_error_codes.h
do
    if ! diff contrib/gana/gnu-taler-error-codes/${n} src/include/${n} > /dev/null
    then
        cp contrib/gana/gnu-taler-error-codes/$n src/include/$n
    fi
done
cd contrib/gana/gnu-taler-db-events
make
cd ../../..
for n in taler_dbevents.h
do
    if ! diff contrib/gana/gnu-taler-db-events/${n} src/include/${n} > /dev/null
    then
        cp contrib/gana/gnu-taler-db-events/$n src/include/$n
    fi
done