mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-27 02:50:53 +00:00
Add --admininstall parameter to c1_shard_patch
This commit is contained in:
parent
1bd6e0993a
commit
b932a7de2a
1 changed files with 21 additions and 16 deletions
|
@ -24,9 +24,13 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
|
||||||
import time, sys, os, shutil, subprocess, distutils.dir_util, tarfile
|
import time, sys, os, shutil, subprocess, distutils.dir_util, tarfile, argparse
|
||||||
sys.path.append("configuration")
|
sys.path.append("configuration")
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser(description='Ryzom Core - Build Gamedata - Shard Patch')
|
||||||
|
parser.add_argument('--admininstall', '-ai', action='store_true')
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
if os.path.isfile("log.log"):
|
if os.path.isfile("log.log"):
|
||||||
os.remove("log.log")
|
os.remove("log.log")
|
||||||
log = open("log.log", "w")
|
log = open("log.log", "w")
|
||||||
|
@ -84,23 +88,24 @@ else:
|
||||||
printLog(log, "SKIP " + adminInstallTgz)
|
printLog(log, "SKIP " + adminInstallTgz)
|
||||||
printLog(log, "")
|
printLog(log, "")
|
||||||
|
|
||||||
printLog(log, ">>> Create new version <<<")
|
if not args.admininstall:
|
||||||
newVersion = 1
|
printLog(log, ">>> Create new version <<<")
|
||||||
vstr = str(newVersion).zfill(6)
|
newVersion = 1
|
||||||
vpath = PatchmanBridgeServerDirectory + "/" + vstr
|
vstr = str(newVersion).zfill(6)
|
||||||
while os.path.exists(vpath):
|
vpath = PatchmanBridgeServerDirectory + "/" + vstr
|
||||||
|
while os.path.exists(vpath):
|
||||||
newVersion = newVersion + 1
|
newVersion = newVersion + 1
|
||||||
vstr = str(newVersion).zfill(6)
|
vstr = str(newVersion).zfill(6)
|
||||||
vpath = PatchmanBridgeServerDirectory + "/" + vstr
|
vpath = PatchmanBridgeServerDirectory + "/" + vstr
|
||||||
mkPath(log, vpath)
|
mkPath(log, vpath)
|
||||||
for dir in archiveDirectories:
|
for dir in archiveDirectories:
|
||||||
mkPath(log, ShardInstallDirectory + "/" + dir)
|
mkPath(log, ShardInstallDirectory + "/" + dir)
|
||||||
tgzPath = vpath + "/" + dir + ".tgz"
|
tgzPath = vpath + "/" + dir + ".tgz"
|
||||||
printLog(log, "WRITE " + tgzPath)
|
printLog(log, "WRITE " + tgzPath)
|
||||||
tar = tarfile.open(tgzPath, "w:gz")
|
tar = tarfile.open(tgzPath, "w:gz")
|
||||||
tar.add(ShardInstallDirectory + "/" + dir, arcname = dir)
|
tar.add(ShardInstallDirectory + "/" + dir, arcname = dir)
|
||||||
tar.close()
|
tar.close()
|
||||||
printLog(log, "")
|
printLog(log, "")
|
||||||
|
|
||||||
log.close()
|
log.close()
|
||||||
if os.path.isfile("c1_shard_patch.log"):
|
if os.path.isfile("c1_shard_patch.log"):
|
||||||
|
|
Loading…
Reference in a new issue