Make Crunchy to properly return a return code when running fine or failing
This commit is contained in:
parent
3a95994cc2
commit
3bf5fea735
10
bin/crunchy.sh
Executable file
10
bin/crunchy.sh
Executable 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
|
||||||
@ -17,7 +17,8 @@
|
|||||||
},
|
},
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"bin": {
|
"bin": {
|
||||||
"crunchy": "./bin/crunchy"
|
"crunchy": "./bin/crunchy",
|
||||||
|
"crunchy.sh": "./bin/crunchy.sh"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"big-integer": "^1.6.27",
|
"big-integer": "^1.6.27",
|
||||||
|
|||||||
@ -6,5 +6,8 @@ batch(process.argv, (err: any) =>
|
|||||||
if (err)
|
if (err)
|
||||||
{
|
{
|
||||||
console.error(err.stack || err);
|
console.error(err.stack || err);
|
||||||
|
process.exit(-1)
|
||||||
}
|
}
|
||||||
|
console.info("Done!")
|
||||||
|
process.exit(0)
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user