diff --git a/scripts/maint/geoip/update_and_commit_geoip.sh b/scripts/maint/geoip/update_and_commit_geoip.sh new file mode 100755 index 0000000000..a83f82433e --- /dev/null +++ b/scripts/maint/geoip/update_and_commit_geoip.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +set -e + +CMDDIR=$(cd "$(dirname "$0")" && pwd) + +if [ ! -e "./src/config/geoip" ] ; then + echo "Run this from inside the root dir of your oldest LTS repository" + exit 1 +fi + +if [ -n "$(git status --untracked-files=no --porcelain)" ]; then + echo "Working directory is not clean." + exit 1 +fi + +TOPDIR=$(pwd) +cd "./src/config/" +"${CMDDIR}/update_geoip.sh" +cd "${TOPDIR}" + +DASH_DATE=$(date -u +"%Y-%m-%d") +SLASH_DATE=$(date -u +"%Y/%m/%d") +CHANGESFILE="changes/geoip-$DASH_DATE" + +cat > "$CHANGESFILE" <