update patch server, remove root.bnp and adding ".ref" files

This commit is contained in:
Jerome Sagnole 2017-08-27 18:38:14 +02:00
parent b66681aace
commit 17c3e4513c

View file

@ -401,7 +401,7 @@ do
done done
for file in $PATCH_HOME/patch_service/dataserver/client/*.bnp for file in $PATCH_HOME/patch_service/dataserver/client/*.bnp
do do
mv "$file" "${file%.bnp}.ref" || exit 2 mv "$file" "${file%.bnp}_.ref" || exit 2
done done
@ -445,6 +445,33 @@ su -c "cd $PATCH_HOME/patch_service;touch patch_game/Lirria.version" gameserver
sed -i -r 's/value="main"/value="khanat_lirria"/g' patch_game/ryzom.xml || exit 2 sed -i -r 's/value="main"/value="khanat_lirria"/g' patch_game/ryzom.xml || exit 2
sed -i -r 's/_NextVersionFile type="STRING" value=""/_NextVersionFile type="STRING" value="patch_game\/Lirria.version"/g' patch_game/ryzom.xml || exit 2 sed -i -r 's/_NextVersionFile type="STRING" value=""/_NextVersionFile type="STRING" value="patch_game\/Lirria.version"/g' patch_game/ryzom.xml || exit 2
# Edit RYZOM file
# search all ref files
ADDREF=""
for file in /home/gameserver/patch_service/patch_game/bnp/*.ref
do
ADDREF="$ADDREF"'<_Files type=\"STRING\" value=\"'$(basename $file)'\"/>'
done
#echo $ADDREF
# Remove other _Category (keep 1st) and add ref file
cp patch_game/ryzom.xml patch_game/ryzom.xml.ref || exit 2
awk 'BEGIN{found=0}{
if(found==0 && $1 == "<_Category>") {
found = 1;
} else if(found == 1 && $1 == "</_Category>") {
found = 2;
print "'"$ADDREF"'";
print $0;
} else if(found == 2 && $1 == "</_Categories>") {
found = 3;
}
if ( found != 2 ) {
print $0
}
}' patch_game/ryzom.xml.ref > patch_game/ryzom.xml || exit 2
#cat << EOF > $PATCH_HOME/patch_service/patch_game/ryzom.xml #cat << EOF > $PATCH_HOME/patch_service/patch_game/ryzom.xml
#<xml> #<xml>
# <_Categories> # <_Categories>