tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

update_and_commit_geoip.sh (777B)


      1 #!/bin/sh
      2 
      3 set -e
      4 
      5 CMDDIR=$(cd "$(dirname "$0")" && pwd)
      6 
      7 if [ ! -e "./src/config/geoip" ] ; then
      8    echo "Run this from inside the root dir of your oldest LTS repository"
      9    exit 1
     10 fi
     11 
     12 if [ -n "$(git status --untracked-files=no --porcelain)" ]; then
     13    echo "Working directory is not clean."
     14    exit 1
     15 fi
     16 
     17 TOPDIR=$(pwd)
     18 cd "./src/config/"
     19 "${CMDDIR}/update_geoip.sh"
     20 cd "${TOPDIR}"
     21 
     22 DASH_DATE=$(date -u +"%Y-%m-%d")
     23 SLASH_DATE=$(date -u +"%Y/%m/%d")
     24 CHANGESFILE="changes/geoip-$DASH_DATE"
     25 
     26 cat > "$CHANGESFILE" <<EOF
     27  o Minor features (geoip data):
     28    - Update the geoip files to match the IPFire Location Database,
     29      as retrieved on ${SLASH_DATE}.
     30 EOF
     31 
     32 git add "$CHANGESFILE"
     33 
     34 git commit -a -m "Update geoip files to match ipfire location db, $SLASH_DATE."
     35 
     36 exit 0