Skip to content

Commit da5f337

Browse files
committed
windows 脚本
1 parent 9ecefa2 commit da5f337

File tree

7 files changed

+99
-2
lines changed

7 files changed

+99
-2
lines changed

getpkg.bat

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
@echo off
2+
3+
setlocal
4+
5+
if exist getpkg.bat goto ok
6+
echo getpkg.bat must be run from its folder
7+
goto end
8+
9+
:ok
10+
11+
set OLDGOPATH=%GOPATH%
12+
set GOPATH=%~dp0
13+
14+
cd src
15+
16+
gvt restore -connections 8
17+
18+
cd ..
19+
20+
set GOPATH=%OLDGOPATH%
21+
22+
:end
23+
echo finished
24+

getpkg.sh

-1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,5 @@ fi
4141
cd ..
4242

4343
export GOPATH="$OLDGOPATH"
44-
export PATH="$OLDPATH"
4544

4645
echo 'finished'

install.bat

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
@echo off
2+
3+
setlocal
4+
5+
if exist install.bat goto ok
6+
echo install.bat must be run from its folder
7+
goto end
8+
9+
:ok
10+
11+
set OLDGOPATH=%GOPATH%
12+
set GOPATH=%~dp0
13+
14+
if not exist log mkdir log
15+
16+
gofmt -w src
17+
18+
go install server/studygolang
19+
go install server/indexer
20+
go install server/crawler
21+
22+
set GOPATH=%OLDGOPATH%
23+
24+
:end
25+
echo finished

reload.bat

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
@echo off
2+
3+
setlocal
4+
5+
if exist reload.bat goto ok
6+
echo reload.bat must be run from its folder
7+
goto end
8+
9+
:ok
10+
11+
:: stop
12+
taskkill /im studygolang.exe /f
13+
del /q /f /a pid
14+
15+
:: start
16+
start /b bin\studygolang >> log\panic.log 2>&1 &
17+
18+
echo reload successfully
19+
20+
:end

src/vendor/manifest

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
{
100100
"importpath": "github.com/go-sql-driver/mysql",
101101
"repository": "https://github.com/go-sql-driver/mysql",
102-
"revision": "1421caf44f6464fd2ee8de694c7508ee13f92964",
102+
"revision": "3654d25ec346ee8ce71a68431025458d52a38ac0",
103103
"branch": "master"
104104
},
105105
{

start.bat

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
@echo off
2+
3+
setlocal
4+
5+
if exist start.bat goto ok
6+
echo start.bat must be run from its folder
7+
goto end
8+
9+
:ok
10+
11+
start /b bin\studygolang >> log\panic.log 2>&1 &
12+
13+
echo start successfully
14+
15+
:end

stop.bat

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
@echo off
2+
3+
setlocal
4+
5+
if exist stop.bat goto ok
6+
echo stop.bat must be run from its folder
7+
goto end
8+
9+
:ok
10+
11+
taskkill /im studygolang.exe /f
12+
del /q /f /a pid
13+
14+
:end

0 commit comments

Comments
 (0)