-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpublish.bat
26 lines (24 loc) · 974 Bytes
/
publish.bat
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
@echo off
SETLOCAL ENABLEDELAYEDEXPANSION
FOR %%p IN (.,pub,publish,Unknown6656.Publisher,../Unknown6656.Publisher,../../Unknown6656.Publisher) DO (
SET _pyfile="%%p/publish.py"
ECHO looking for python script inside %%p ...
IF EXIST "!_pyfile!" (
ECHO invoking python script !_pyfile! ...
python "!_pyfile!" "%~f0"
GOTO :success
)
)
:failure
ECHO The file 'publish.py' could not be found in one of the following directories:
ECHO - ./
ECHO - pub/
ECHO - publish/
ECHO - Unknown6656.Publisher/
ECHO - ../Unknown6656.Publisher/
ECHO - ../../Unknown6656.Publisher/
ECHO Please clone 'https://github.com/Unknown6656-Megacorp/Unknown6656.Publisher' into the current or corresponding directoy.
ECHO Note that you'll have to create and adapt the file 'secrets.py' to contain the publisher API key.
:success
SET "_pyfile="
ENDLOCAL