Merge pull request #8 from deltachat/improve-script

create-xdc.sh improvements, use project folder name as default PACKAGE_NAME
master
Asiel Díaz Benítez 2022-01-03 19:32:54 -05:00 committed by GitHub
commit 0bd3486980
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 7 deletions

View File

@ -1,12 +1,17 @@
#!/bin/sh
if [ $# -eq 0 ]
then
echo "usage: zip-xdc.sh PACKAGE_NAME"
exit
fi
PACKAGE_NAME=$1
case "$1" in
"-h" | "--help")
echo "usage: ${0##*/} [PACKAGE_NAME]"
exit
;;
"")
PACKAGE_NAME=${PWD##*/}
;;
*)
PACKAGE_NAME=$1
;;
esac
rm $PACKAGE_NAME.xdc 2> /dev/null
zip -9 --recurse-paths $PACKAGE_NAME.xdc * --exclude README.md webxdc.js "*.sh" "*.xdc"