deps.sh 539 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. # Download and update deps for binary
  3. # get the directory of this script file
  4. DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
  5. PUBLIC=$DIR/public
  6. echo "download js bundle files"
  7. curl https://npm.reversehttp.com/@preact/signals-core,@preact/signals,htm/preact,preact,preact/hooks > $PUBLIC/index.js
  8. echo >> $PUBLIC/index.js # add newline
  9. FILES=$(ls $PUBLIC)
  10. cd $PUBLIC
  11. for FILE in $FILES; do
  12. echo "generate $FILE.hpp"
  13. # use simple flag for old version of xxd
  14. xxd -i $FILE > $DIR/$FILE.hpp
  15. done