#!/bin/bash -e 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" } iwd_filelist="$(mktemp)" iwd_files > "$iwd_filelist" modversion_txt_file="mod_version.csv" git describe --tags --always --dirty > "$modversion_txt_file" echo "$modversion_txt_file" >> "$iwd_filelist" rm -f "hns.iwd" 7z a -tzip -mx9 "hns.iwd" @"$iwd_filelist" rm -f "$iwd_filelist" "$modversion_txt_file"