Discord/Mattermost/Slack end-to-end encryption in different variations (Mostly proof of concept, you have been warned)

min 344B

1234567891011121314
  1. #!/bin/bash
  2. for f in src/*-aes.js src/*-xor.js
  3. do
  4. INFILE=$f
  5. OUTFILE="dist/`basename ${f/.js/.min.js}`"
  6. if [ "$INFILE" -nt "$OUTFILE" ]
  7. then
  8. echo "$INFILE > $OUTFILE"
  9. java -jar ../closure-compiler-v20180610.jar --js "$INFILE" --language_out ECMASCRIPT_2016 2>/dev/null | tr -d "\n" > "$OUTFILE"
  10. touch -r "$INFILE" "$OUTFILE"
  11. fi
  12. done