Make Crunchy to properly return a return code when running fine or failing

This commit is contained in:
Godzil 2018-05-08 21:37:34 +01:00
parent 3a95994cc2
commit 3bf5fea735
3 changed files with 15 additions and 1 deletions

10
bin/crunchy.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
PARAMS=$*
for i in {1..20}; do
crunchy -u ${PARAMS}
if [ $? == 0 ]; then
break
fi
echo "Going to retry..."
sleep 3
done

View File

@ -17,7 +17,8 @@
},
"version": "1.2.0",
"bin": {
"crunchy": "./bin/crunchy"
"crunchy": "./bin/crunchy",
"crunchy.sh": "./bin/crunchy.sh"
},
"dependencies": {
"big-integer": "^1.6.27",

View File

@ -6,5 +6,8 @@ batch(process.argv, (err: any) =>
if (err)
{
console.error(err.stack || err);
process.exit(-1)
}
console.info("Done!")
process.exit(0)
});