tor/scripts/maint/geoip/update_geoip.sh
David Goulet 5530af675b scripts: Quiet the IPFire location GeoIP command
We do this to avoid useless outputs but also, in the CI environement,
the Python logging package stacktraces with a problem on a socket.

The command still works but the logging fails. With the quiet switch, we
don't get such stacktrace.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-27 10:24:13 -04:00

17 lines
283 B
Bash
Executable File

#!/bin/sh
set -e
DIR=$(cd "$(dirname "$0")" && pwd)
TMP=$(mktemp -d)
location --quiet update
location dump "$TMP/geoip-dump.txt"
OLDDIR=$(pwd)
cd "$DIR/geoip-db-tool/"
cargo build --release
cd "$OLDDIR"
"$DIR/geoip-db-tool/target/release/geoip-db-tool" -i "$TMP/geoip-dump.txt"