forked from geeeeeeeeek/electronic-wechat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
qiniu.sh
executable file
·31 lines (24 loc) · 788 Bytes
/
qiniu.sh
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
#!/bin/bash
case "$(uname -s)" in
Linux*)
wget http://devtools.qiniu.com/qiniu-devtools-linux_amd64-current.tar.gz -O dist/qiniu-devtools.tar.gz
;;
Darwin)
wget http://devtools.qiniu.io/qiniu-devtools-darwin_amd64-current.tar.gz -O dist/qiniu-devtools.tar.gz
;;
*)
;;
esac
mkdir dist/qiniu-devtools
tar -xvf dist/qiniu-devtools.tar.gz -C dist/qiniu-devtools
rm -rf /tmp/qiniu
mkdir /tmp/qiniu
cp dist/mac-osx.tar.gz /tmp/qiniu
cp dist/linux-x64.tar.gz /tmp/qiniu
cp dist/linux-ia32.tar.gz /tmp/qiniu
echo '{
"src": "/tmp/qiniu",
"dest": "qiniu:access_key='$QINIU_ACCESS_KEY'&secret_key='$QINIU_SECRET_KEY'&bucket=flymeos-cancro",
"debug_level": 1
}' > qiniu-config.json
./dist/qiniu-devtools/qrsync qiniu-config.json