Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix URL for checking new master data for R06 #91

Merged
merged 1 commit into from Mar 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/check-for-new-master-data.sh
Expand Up @@ -7,7 +7,7 @@ if [ -n "$(gh pr list --search head:new-master-data --state open)" ]; then
fi

# Get latest update date from website
content=$(curl https://www.ssk.or.jp/seikyushiharai/tensuhyo/kihonmasta/r04/kihonmasta_01.html)
content=$(curl https://www.ssk.or.jp/seikyushiharai/tensuhyo/kihonmasta/r06/kihonmasta_01.html)
date=$(echo $content | grep -oE 'kihonmasta_01\.files/s_ALL[0-9]{8}\.zip' | grep -oE '[0-9]{8}')

if [ -z "$date" ]; then
Expand All @@ -19,7 +19,7 @@ file_name="s_ALL${date}.csv"

# Download latest master data if not exists
if [ ! -f "raw-master-data/s/$file_name" ]; then
curl -o s_ALL${date}.zip https://www.ssk.or.jp/seikyushiharai/tensuhyo/kihonmasta/kihonmasta_01.files/s_ALL${date}.zip
curl -o s_ALL${date}.zip https://www.ssk.or.jp/seikyushiharai/tensuhyo/kihonmasta/r06/kihonmasta_01.files/s_ALL${date}.zip
unzip s_ALL${date}.zip -d raw-master-data/s/
rm s_ALL${date}.zip

Expand Down