diff options
| author | login (tilde.club) <login@tilde.club> | 2019-11-15 19:21:57 -0700 |
|---|---|---|
| committer | login (tilde.club) <login@tilde.club> | 2019-11-15 19:21:57 -0700 |
| commit | 3dfe89db4a2e19341d178197d5f805972c4d4e68 (patch) | |
| tree | 7954af660a9b93da784b43326d656692aa62c84d | |
| parent | 8573e74a01824341c54d0fdd7e5c1e70a0a7a323 (diff) | |
| download | tcoin-3dfe89db4a2e19341d178197d5f805972c4d4e68.tar.gz | |
Added check for number of basecoins <n> in ntcoin
ntcoin would accept no number of basecoins <n>. Now, there is a check added near the beginning for <n> existing and being a non-negative integer.
| -rwxr-xr-x | ntcoin | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -28,6 +28,11 @@ then #define DA_OFF #define MINERCOIN_OFF' else + #see https://stackoverflow.com/a/3951175 + case $3 in + ''|*[!0-9]*) /bin/echo "Sorry, the number of basecoins <n> should be a positive integer."; exit 1 ;; + *) ;; + esac if [ -d "`/usr/bin/realpath -s $1`/tcoin" ] then /bin/echo "Sorry, '`/usr/bin/realpath -s $1`/tcoin' already exists." |