diff options
author | Mario <mario@mariovavti.com> | 2024-03-10 22:38:21 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2024-03-10 22:38:21 +0000 |
commit | 360713c6896d18a95dd3ca541ea477bf44b98d0c (patch) | |
tree | 8acaa683b277023aa4842f25b04623ae196fa1ae /library/sodium-plus/build.sh | |
parent | ee8aba3221f995b265c3196505a1c7c26b76f116 (diff) | |
download | volse-hubzilla-360713c6896d18a95dd3ca541ea477bf44b98d0c.tar.gz volse-hubzilla-360713c6896d18a95dd3ca541ea477bf44b98d0c.tar.bz2 volse-hubzilla-360713c6896d18a95dd3ca541ea477bf44b98d0c.zip |
add sodium-plus js crypto library
Diffstat (limited to 'library/sodium-plus/build.sh')
-rw-r--r-- | library/sodium-plus/build.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/library/sodium-plus/build.sh b/library/sodium-plus/build.sh new file mode 100644 index 000000000..fc6396f3c --- /dev/null +++ b/library/sodium-plus/build.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +basedir=$(dirname $(readlink -f ${BASH_SOURCE[0]})) +path="${basedir}/build/remove-sodium-native.sh" + +bash "${path}" +ret=$? +if [[ $ret -ne 0 ]]; then + echo "Exiting..." + exit "${ret}" +fi + +echo "Building..." +browserify browser.js > dist/sodium-plus.js +echo "Minifying..." +browserify browser.js -p tinyify > dist/sodium-plus.min.js +echo "Build complete! Resetting..." + +# Once browserify finishes, rollback changes that removed sodium-native. +git checkout -- lib/* +git checkout -- lib/*/* +echo "Done!" |