wIK5Ez2o commited on
Commit
504beef
·
verified ·
1 Parent(s): 2436913

Delete launch.sh

Browse files
Files changed (1) hide show
  1. launch.sh +0 -57
launch.sh DELETED
@@ -1,57 +0,0 @@
1
- #!/bin/sh
2
-
3
- function env() {
4
- if [[ ! -z "${fetch}" ]]; then
5
- echo '远程获取参数...'
6
- curl -s "$fetch" -o data.json
7
- export github_secret=$(jq -r .github_secret data.json)
8
- export github_project=$(jq -r .github_project data.json)
9
- fi
10
-
11
- echo
12
- echo "fetch = ${fetch}"
13
- echo "github_secret = $github_secret"
14
- echo "github_project = $github_project"
15
- echo
16
- echo
17
-
18
- sed -i "s/\[github_secret\]/${github_secret}/g" /launch.sh
19
- sed -i "s#\[github_project\]#${github_project}#g" /launch.sh
20
- }
21
-
22
- function init() {
23
- #mkdir /data
24
- #chmod 777 /data
25
- cd /data
26
-
27
- #git init
28
- #git config user.email "[email protected]"
29
- #git config user.name "git-batch"
30
- #git config init.defaultBranch main
31
-
32
- #git branch -m main
33
- #git remote add origin https://${github_secret}@github.com/${github_project}.git
34
- git clone https://${github_secret}@github.com/${github_project}.git .
35
- git config --global --add safe.directory /data
36
- git add .
37
- echo "'update data $(date "+%Y-%m-%d %H:%M:%S")'"
38
- git commit -m "'update data $(date "+%Y-%m-%d %H:%M:%S")'"
39
- git pull origin main
40
-
41
- cd /
42
- chmod -R 777 data
43
- nohup ./git-batch --commit 10s --name git-batch --email [email protected] --push 1m -p data > access.log 2>1 &
44
- }
45
-
46
- case $1 in
47
- env)
48
- env
49
- ;;
50
- init)
51
- init
52
- ;;
53
- start)
54
- init
55
- /one-api
56
- ;;
57
- esac