diff --git a/find_vanity.js b/find_vanity.js index 12762b4..92bb1d7 100644 --- a/find_vanity.js +++ b/find_vanity.js @@ -2,4 +2,4 @@ const fs = require("fs"); const micro_ipfs = require('./micro_ipfs.js'); const jsonp = fs.readFileSync(process.argv[2], 'utf-8'); const directory_hashes = JSON.parse(jsonp.substring('jsonp_ipfs_directory_hashes('.length, jsonp.length - ');\n'.length)); -console.log(micro_ipfs.ipfs_self_hash.find_vanity_node(null, 'soy', 0, directory_hashes)); \ No newline at end of file +console.log(micro_ipfs.ipfs_self_hash.find_vanity_node(null, process.argv[3], 0, directory_hashes)); \ No newline at end of file diff --git a/update_directory_hashes.sh b/update_directory_hashes.sh index 66a2e36..7832972 100755 --- a/update_directory_hashes.sh +++ b/update_directory_hashes.sh @@ -21,6 +21,7 @@ cat > "$directory/ipfs-add.sh" <<'EOF' set -euET -o pipefail ipfs cid base32 "$(ipfs add --ignore-rules-path result/www/.ipfsignore --pin=false --hidden -Qr "$(dirname "$0")")" EOF +chmod +x "$directory/ipfs-add.sh" # TODO: use ipfs dag get instead of ipfs object get partial_hash="$(ipfs add --ignore-rules-path "$directory/.ipfsignore" --pin=false --hidden -Qr "$directory")" @@ -32,7 +33,7 @@ write_directory_hashes() { } write_directory_hashes "0" -vanity_number="$(node "$(dirname "$0")/find_vanity.js" "$directory/directory_hashes.js")" +vanity_number="$(node "$(dirname "$0")/find_vanity.js" "$directory/directory_hashes.js" "$vanity_text")" printf 'Found vanity number: %s\n' $vanity_number >&2 write_directory_hashes "$vanity_number"