diff options
author | Jesusaves <cpntb1@ymail.com> | 2018-05-30 18:02:26 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2018-05-30 18:02:26 -0300 |
commit | f21d40102e25befcfd69246a49080f22617b85c8 (patch) | |
tree | 97dd47ef8fd9ea159d35bfc9811a6eabebcc4bd2 | |
parent | e4b41f3cfd567837e4a0973230182474982dea55 (diff) | |
download | tools-f21d40102e25befcfd69246a49080f22617b85c8.tar.gz tools-f21d40102e25befcfd69246a49080f22617b85c8.tar.bz2 tools-f21d40102e25befcfd69246a49080f22617b85c8.tar.xz tools-f21d40102e25befcfd69246a49080f22617b85c8.zip |
Pseudo Update script - useful to make fake updates.
-rwxr-xr-x | update/pseudo_update.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/update/pseudo_update.sh b/update/pseudo_update.sh new file mode 100755 index 0000000..b688937 --- /dev/null +++ b/update/pseudo_update.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +# Copyright (C) 2010-2012 TMW2 Online +# Author: Andrei Karas (4144) + +dir=`pwd` + +previous=`cat commit.txt` + +cd ../../client-data +head=`git log --pretty=oneline -n 1 | awk '{print $1}'` +u1=`echo ${previous} | cut -c 1-7` +u2=`echo ${head} | cut -c 1-7` +git log --name-status ${previous}..${head} | awk '/^(A|M)\t/ {print $2}' | \ +grep -e "[.]\(xml\|png\|tmx\|ogg\|txt\|po\|tsx\)" | sort | uniq | \ +xargs zip -X -9 -r ../tools/update/files/TMW2-${u1}..${u2}.zip + +cd $dir/upload + +sum=`adler32 Extra-${u1}..${u2}.zip | awk '{print $2}'` +echo "Update ID: ${u1}..${u2}" +echo "Checksum: ${sum}" + +echo "Extra-${u1}..${u2}.zip ${sum}" >>resources2.txt +cp ../files/xml_header.txt resources.xml +echo " <update type=\"data\" file=\"Extra-${u1}..${u2}.zip\" hash=\"${sum}\" />" >> resources.xml +cat ../files/xml_footer.txt >>resources.xml |