diff --git a/pack.sh b/pack.sh new file mode 100755 index 0000000..b4b62c4 --- /dev/null +++ b/pack.sh @@ -0,0 +1,12 @@ +#!/bin/sh +EXCLUDE_FILES=LICENSE README.md webxdc.js *~ *.xdc *.sh +MAX_SIZE=100000 # 100 kilobytes + +rm application.xdc +zip -9 --recurse-paths application.xdc --exclude $EXCLUDE_FILES -- * +unzip -l application.xdc + +# Check package size. +if [ $(wc -c < application.xdc) -ge $MAX_SIZE ]; then + echo "WARNING: package size exceeded 100 kilobytes" +fi diff --git a/create-xdc.sh b/pack.sh~ similarity index 100% rename from create-xdc.sh rename to pack.sh~