Skip to content

Commit

Permalink
copytogimp.bat revamp
Browse files Browse the repository at this point in the history
also exclude test-related files
  • Loading branch information
martin-brajer committed May 14, 2021
1 parent e4630bd commit e384391
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions copytogimp.bat
Expand Up @@ -3,26 +3,25 @@
@REM Supply an argument for an alternative folder.
SET gimpversion=2.10
IF "%1" == "" (
SET gimpplugins=%UserProfile%\AppData\Roaming\GIMP\%gimpversion%\plug-ins\
SET "gimpplugins=%UserProfile%\AppData\Roaming\GIMP\%gimpversion%\plug-ins\"
) ELSE (
SET gimpplugins=%1
SET "gimpplugins=%1"
)
IF NOT EXIST %gimpplugins% (
IF NOT EXIST "%gimpplugins%" (
ECHO Version folder does not exist, probably wrong gimpversion & CMD /k & GOTO End
)

@REM This script folder, then src subfolder
SET src=%~dp0src\
SET name=cardassembler
SET pluginfolder=%gimpplugins%%name%
SET "src=%~dp0src"
SET "name=cardassembler"
SET "pluginfolder=%gimpplugins%%name%"
SET "exclude=test_card_assembler.py my_mock.py"

IF NOT EXIST %pluginfolder% (
MKDIR %pluginfolder% & ECHO Create a folder
IF NOT EXIST "%pluginfolder%" (
MKDIR "%pluginfolder%" & ECHO Create a folder
)

COPY %src% %pluginfolder%
@REM copy %src%cardassembler.py %pluginfolder%
@REM copy %src%blueprint.py %pluginfolder%
Robocopy "%src%" "%pluginfolder%" *.py /xf %exclude%

@REM CMD /k
:End

0 comments on commit e384391

Please sign in to comment.