forked from Rin0530/220613_ServerlessBot
-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathinitForMac.sh
More file actions
executable file
·57 lines (43 loc) · 1.15 KB
/
initForMac.sh
File metadata and controls
executable file
·57 lines (43 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#! /bin/bash
read -s -p "BOT_TOKENを入力してください: " TOKEN
read -s -p "Application_IDを入力してください: " ID
echo 必要なもののダウンロードを開始します
brew install deno > /dev/null 2>&1
ret=$?
if test $ret -ne 0 ; then
curl -fsSL https://deno.land/x/install/install.sh | sh > /dev/null 2>&1
deno_path=$HOME/.deno/bin/deno
else
deno_path=$(which deno)
fi
if test $SHELL=/bin/bash ; then
rc=~/.bashrc
elif test $SHELL=/bin/zsh ; then
rc=~/.zshrc
else
rc=~/.profile
fi
export DENO_INSTALL="$HOME/.deno"
export PATH="$HOME/.deno/bin:$PATH"
echo export DENO_INSTALL="$HOME/.deno" >> $rc
echo export PATH="$HOME/.deno/bin:$PATH" >> $rc
$deno_path install -qAn vr https://deno.land/x/velociraptor@1.5.0/cli.ts > /dev/null 2>&1
echo BOT_TOKEN=$TOKEN >> env
echo Application_ID=$ID >> env
# setting.jsonも生成したい
mkdir .vscode
cat << EOF > .vscode/setting.json
{
"deno.enable": true,
"deno.path": "$DENO_INSTALL/bin"
}
EOF
cat << EOF > .vscode/extensions.json
{
"recommendations": [
"denoland.vscode-deno"
]
}
EOF
$HOME/.deno/bin/vr create
echo "please execution 'source $rc'"