mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-18 01:25:50 +00:00
Clean up utility scripts.
This commit is contained in:
@@ -3,8 +3,9 @@
|
|||||||
// Returns a Gravatar style hash as per: http://en.gravatar.com/site/implement/hash/
|
// Returns a Gravatar style hash as per: http://en.gravatar.com/site/implement/hash/
|
||||||
//
|
//
|
||||||
|
|
||||||
if (process.argv.length != 3) {
|
if (3 != process.argv.length) {
|
||||||
process.stderr.write("Usage: " + process.argv[1] + " email_address\n\nReturns gravitar style hash.\n");
|
process.stderr.write("Usage: " + process.argv[1] + " email_address\n\nReturns gravitar style hash.\n");
|
||||||
|
process.exit(1);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
var md5 = require('crypto').createHash('md5');
|
var md5 = require('crypto').createHash('md5');
|
||||||
|
|||||||
@@ -11,8 +11,9 @@ var stringToHex = function (s) {
|
|||||||
}).join("");
|
}).join("");
|
||||||
};
|
};
|
||||||
|
|
||||||
if (process.argv.length != 3) {
|
if (3 != process.argv.length) {
|
||||||
process.stderr.write("Usage: " + process.argv[1] + " string\n\nReturns hex of lowercasing string.\n");
|
process.stderr.write("Usage: " + process.argv[1] + " string\n\nReturns hex of lowercasing string.\n");
|
||||||
|
process.exit(1);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user