tor/scripts/maint/geoip/update_geoip.sh

17 lines
275 B
Bash
Raw Normal View History

#!/bin/sh
set -e
DIR=$(cd "$(dirname "$0")" && pwd)
TMP=$(mktemp -d)
location 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"