Compare commits

..

No commits in common. "144747c1d816ab81ce2a6d8bb1e6c990de4f6b38" and "bb1e875abc5b33ce490bd8f36910854f27439988" have entirely different histories.

3 changed files with 13 additions and 39 deletions

View File

@ -1,5 +1,4 @@
@echo off & setlocal
cd %~dp0
pushd ..\..
iw4x -zonebuilder +set fs_game "mods\Hide and Seek v2" +buildzone "..\mods\Hide and Seek v2\mod" +quit
popd

View File

@ -1,4 +0,0 @@
@echo off & setlocal
cd %~dp0
git-bash ./build_iwd.sh
endlocal

View File

@ -1,22 +1,16 @@
#!/bin/bash -e
iwd_sv_target_filename="z_svr_hns.iwd"
iwd_cl_target_filename="hns.iwd"
iwd_target_filename="z_svr_hns.iwd"
if [ -z "${WORKSPACE}" ]; then
WORKSPACE="$(pwd)"
export WORKSPACE="$(pwd)"
fi
export WORKSPACE
iwd_files() {
negate=""
if [ "$1" = "server" ]; then
negate="-not"
fi
iwd_files()
{
find "${WORKSPACE}/" -type f \
! -path "*.git*" \
! -name "README*" \
! -name "LICENSE*" \
! -name "mod.*" \
! -name "_modversion.gsc" \
! -name "missingasset.csv" \
@ -26,33 +20,18 @@ iwd_files() {
! -name "*.sh" \
! -name "*.bat" \
! -name "*.cmd" \
! -name "*.iwd" \
! -name "*.str" \
-and $negate \( \
-name "*.menu" \
-or -name "*.txt" \
\) \
| sed "s;${WORKSPACE}/;;g"
! -name "*.iwd" |\
sed "s;${WORKSPACE}/;;g"
}
iwd_cl_filelist="$(mktemp)"
iwd_sv_filelist="$(mktemp)"
echo ""
echo "== CLIENT =="
iwd_files client | tee "$iwd_cl_filelist"
echo "== SERVER =="
iwd_files server | tee "$iwd_sv_filelist"
echo ""
iwd_filelist="$(mktemp)"
iwd_files > "$iwd_filelist"
modversion_txt_file="maps/mp/mods/_modversion.gsc"
echo "getModVersionString(){return \"$(git describe --tags --always --dirty)\";}" > "$modversion_txt_file"
(echo "LICENSE.txt") >> "$iwd_cl_filelist"
(echo "$modversion_txt_file" && echo "LICENSE.txt") >> "$iwd_sv_filelist"
echo "getModVersionString(){return \"$(git describe --tags --always)\";}" > "$modversion_txt_file"
echo "$modversion_txt_file" >> "$iwd_filelist"
rm -f "${iwd_sv_target_filename}" "${iwd_cl_target_filename}"
7z a -tzip -mx9 "${iwd_sv_target_filename}" @"$iwd_sv_filelist"
7z a -tzip -mx9 "${iwd_cl_target_filename}" @"$iwd_cl_filelist"
rm -f "${iwd_target_filename}"
7z a -tzip -mx9 "${iwd_target_filename}" @"$iwd_filelist"
rm -f "$iwd_sv_filelist" "$iwd_cl_filelist"
git checkout HEAD -- $modversion_txt_file
rm -f "$iwd_filelist" "$modversion_txt_file"