From 0dd32986e5355f625713041c7f50ba366868ab08 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Mon, 9 Sep 2019 08:27:13 +0900 Subject: [PATCH] Added developer database download --- db/build.sh | 11 +++++++++++ makefile | 6 +++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100755 db/build.sh diff --git a/db/build.sh b/db/build.sh new file mode 100755 index 00000000..bf255ddd --- /dev/null +++ b/db/build.sh @@ -0,0 +1,11 @@ +#!/bin/sh +TYPES=`curl -sS 'https://notify.moe/api/types' | jq '.[]' | cut -d '"' -f 2` +SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" +cd "$SCRIPTPATH" +mkdir -p arn2 + +for TYPENAME in $TYPES; do + echo "Downloading db/arn/$TYPENAME.dat" + URL=https://notify.moe/api/types/$TYPENAME/download + curl -sS $URL -o arn2/$TYPENAME.dat +done diff --git a/makefile b/makefile index e9706be8..bb999ffc 100644 --- a/makefile +++ b/makefile @@ -55,6 +55,10 @@ ifeq ($(OSNAME),OSX) @echo "rdr pass inet proto tcp from any to any port 443 -> 127.0.0.1 port 4001" | sudo pfctl -ef - endif +# downloads the database +db: + @./db/build.sh + # installs systemd service files for all required services services: @./services/build.sh @@ -79,4 +83,4 @@ bench: all: tools assets server bots jobs patches -.PHONY: tools assets server bots jobs patches services ports clean +.PHONY: tools assets server bots jobs patches services db ports clean