Add linux script to generate z_svr_hns.iwd package.

z_svr_hns.iwd will contain all necessary files to run the game mode and is an attempt to replace mod.ff with a complete version of the game that should get sent over by the server when running with an IW4M-based mod.
master
Icedream 2016-04-07 17:40:43 +02:00
parent 183b72892d
commit 4beb573d97
2 changed files with 32 additions and 0 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@ demos/
*.log *.log
*.log.??? *.log.???
missingasset.csv missingasset.csv
*.iwd

31
build_iwd.sh Normal file
View File

@ -0,0 +1,31 @@
if [ -z "${WORKSPACE}"]; then
export WORKSPACE="$(pwd)"
fi
iwd_files()
{
find "${WORKSPACE}/" -type f \
! -path "*.git*" \
! -name "README*" \
! -name "mod.ff" \
! -name "mod.csv" \
! -name "missingasset.csv" \
! -name "*.md" \
! -name "*.log*" \
! -path "*/demos/**" \
! -name "*.sh" \
! -name "*.iwd" |\
sed "s:${WORKSPACE}/::g"
}
gen_iwd_filelist()
{
iwd_filelist="$(mktemp)"
iwd_files > "$iwd_filelist"
echo $iwd_filelist
}
iwd_filelist="$(gen_iwd_filelist)"
rm -f "z_svr_hns.iwd"
7z a -tzip -mx9 "z_svr_hns.iwd" @"$iwd_filelist"
rm -f "$iwd_filelist"