-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcodeInit.py
More file actions
27 lines (21 loc) · 778 Bytes
/
codeInit.py
File metadata and controls
27 lines (21 loc) · 778 Bytes
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
"""
Executing this script directly will instantiate code based off the dfconfig file.
"""
print "importing " + __file__
from dfconfig import *
deployBatContent = r"""REM the following line is a safeguard to protect others from accidental directory content deletion
if %%COMPUTERNAME%% == %(computerName)s (
del /Q %(macroHomeFolder)s
)
if %%COMPUTERNAME%% == %(computerName)s (
xcopy %(macroSourceFolder)s %(macroHomeFolder)s /Y /EXCLUDE:%(macroSourceFolder)s\deployExclude.txt
)
if not %%COMPUTERNAME%% == %(computerName)s (
echo This file needs to be edited to remove/address the file system deletion safeguard
)""" % locals()
def writeDeployBat():
f = open("deploy.bat", "w")
f.write(deployBatContent)
f.close
if __name__ == "__main__":
writeDeployBat()