We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 410a31b + f9000b5 commit aace2a1Copy full SHA for aace2a1
bin/c-search
@@ -1,10 +1,22 @@
1
#!/bin/sh
2
+ENV_FILE=".env"
3
+
4
+if [ ! -f "$ENV_FILE" ]; then
5
+ echo "$ENV_FILE が見つかりません"
6
+ exit 1
7
+fi
8
9
+source "$ENV_FILE"
10
11
+if [ -z "$FIXIE_URL" ]; then
12
+ echo "FIXIE_URL が設定されていません"
13
14
15
16
if [ $# -eq 0 ]
17
then
18
echo "Usage: c-search [CONNPASS_EVENT_URL | CONNPASS_EVENT_ID]"
19
else
- id=`echo $1 | sed -e 's/[^0-9]//g'`
- curl -sL "connpass.com/api/v1/event/?event_id=${id}" | jq ".events[].series.id"
20
+ id=$(echo $1 | sed -e 's/[^0-9]//g')
21
+ curl -x "$FIXIE_URL" -sL "https://connpass.com/api/v1/event/?event_id=${id}" | jq ".events[].series.id"
22
fi
-
0 commit comments