create a script to create a .xdc

This commit is contained in:
B. Petersen 2022-01-01 20:45:59 +01:00
parent 5f6bf9fb14
commit a4f9e07f4e
No known key found for this signature in database
GPG key ID: 3B88E92DEA8E9AFC
3 changed files with 19 additions and 2 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
*.xdc

View file

@ -16,8 +16,8 @@ no server or installation required.
- once you call sendUpdate() in on peer, - once you call sendUpdate() in on peer,
all peers will get the update with their update listeners. all peers will get the update with their update listeners.
keep in mind, when bundling your webxdc app, `webxdc.js` is not needed, when your app is done, you can bundle it using `./create-xdc.sh your-app-name`
it will be provided by the target implementation. and send it to your friends :)
note, that the api is not yet complete, note, that the api is not yet complete,
this is just a, maybe already useful, proof-of-concept for now. this is just a, maybe already useful, proof-of-concept for now.

15
create-xdc.sh Executable file
View file

@ -0,0 +1,15 @@
#!/bin/sh
if [ $# -eq 0 ]
then
echo "usage: zip-xdc.sh PACKAGE_NAME"
exit
fi
PACKAGE_NAME=$1
rm $PACKAGE_NAME.xdc 2> /dev/null
zip -9 --recurse-paths $PACKAGE_NAME.xdc * --exclude README.md webxdc.js "*.sh" "*.xdc"
echo "success, archive contents:"
unzip -l $PACKAGE_NAME.xdc