32 lines
586 B
Bash
32 lines
586 B
Bash
|
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"
|