2016-04-12 21:58:03 +00:00
|
|
|
#!/bin/bash -e
|
2016-04-07 16:56:36 +00:00
|
|
|
if [ -z "${WORKSPACE}" ]; then
|
2016-04-07 15:40:43 +00:00
|
|
|
export WORKSPACE="$(pwd)"
|
|
|
|
fi
|
|
|
|
|
|
|
|
iwd_files()
|
|
|
|
{
|
|
|
|
find "${WORKSPACE}/" -type f \
|
|
|
|
! -path "*.git*" \
|
|
|
|
! -name "README*" \
|
2016-04-12 23:19:34 +00:00
|
|
|
! -name "mod.*" \
|
|
|
|
! -name "_modversion.gsc" \
|
2016-04-07 15:40:43 +00:00
|
|
|
! -name "missingasset.csv" \
|
|
|
|
! -name "*.md" \
|
|
|
|
! -name "*.log*" \
|
|
|
|
! -path "*/demos/**" \
|
|
|
|
! -name "*.sh" \
|
|
|
|
! -name "*.iwd" |\
|
2018-03-29 22:43:35 +00:00
|
|
|
sed "s;${WORKSPACE}/;;g"
|
2016-04-07 15:40:43 +00:00
|
|
|
}
|
|
|
|
|
2016-04-12 21:58:03 +00:00
|
|
|
iwd_filelist="$(mktemp)"
|
|
|
|
iwd_files > "$iwd_filelist"
|
|
|
|
|
2016-04-12 23:19:34 +00:00
|
|
|
modversion_txt_file="maps/mp/mods/_modversion.gsc"
|
|
|
|
echo "getModVersionString(){return \"$(git describe --tags --always --dirty)\";}" > "$modversion_txt_file"
|
2016-04-12 21:58:03 +00:00
|
|
|
echo "$modversion_txt_file" >> "$iwd_filelist"
|
2016-04-07 15:40:43 +00:00
|
|
|
|
2016-04-07 15:54:51 +00:00
|
|
|
rm -f "hns.iwd"
|
|
|
|
7z a -tzip -mx9 "hns.iwd" @"$iwd_filelist"
|
2016-04-12 21:58:03 +00:00
|
|
|
|
|
|
|
rm -f "$iwd_filelist" "$modversion_txt_file"
|