From 6b5e7b8d2242db2b6fd0a39a3800625dcc46f640 Mon Sep 17 00:00:00 2001 From: rakuda Date: Mon, 3 Jun 2024 17:00:31 +0900 Subject: [PATCH 1/2] =?UTF-8?q?c-search=E3=81=A7fixie=20=E3=82=A2=E3=83=89?= =?UTF-8?q?=E3=83=AC=E3=82=B9=E3=82=92=E4=BD=BF=E7=94=A8=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/c-search | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/bin/c-search b/bin/c-search index a9eb3f01f..ddff4b8b5 100755 --- a/bin/c-search +++ b/bin/c-search @@ -1,10 +1,17 @@ #!/bin/sh +ENV_FILE=".env" + +if [ ! -f "$ENV_FILE" ]; then + echo "$ENV_FILE が見つかりません" + exit 1 +fi + +source "$ENV_FILE" + if [ $# -eq 0 ] then echo "Usage: c-search [CONNPASS_EVENT_URL | CONNPASS_EVENT_ID]" else - id=`echo $1 | sed -e 's/[^0-9]//g'` - curl -sL "connpass.com/api/v1/event/?event_id=${id}" | jq ".events[].series.id" + id=$(echo $1 | sed -e 's/[^0-9]//g') + curl -x "$FIXIE_URL" -sL "https://connpass.com/api/v1/event/?event_id=${id}" | jq ".events[].series.id" fi - - From f9000b58e69ef1d36c519d6d4159db8899382c61 Mon Sep 17 00:00:00 2001 From: rakuda Date: Wed, 5 Jun 2024 10:53:55 +0900 Subject: [PATCH 2/2] =?UTF-8?q?FIXIE=5FURL=20=E3=81=AE=E8=A8=AD=E5=AE=9A?= =?UTF-8?q?=E3=81=8C=E3=81=82=E3=82=8B=E3=81=8B=E3=82=92=E7=A2=BA=E8=AA=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/c-search | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/c-search b/bin/c-search index ddff4b8b5..02ec69973 100755 --- a/bin/c-search +++ b/bin/c-search @@ -8,6 +8,11 @@ fi source "$ENV_FILE" +if [ -z "$FIXIE_URL" ]; then + echo "FIXIE_URL が設定されていません" + exit 1 +fi + if [ $# -eq 0 ] then echo "Usage: c-search [CONNPASS_EVENT_URL | CONNPASS_EVENT_ID]"