diff options
| author | ~login@aussies.space <login@aussies.space> | 2019-09-30 14:12:21 +0000 |
|---|---|---|
| committer | ~login@aussies.space <login@aussies.space> | 2019-09-30 14:12:21 +0000 |
| commit | a3c23697851c32be18c8d790a373ab96bb1694f2 (patch) | |
| tree | 9eddb2d0325f13fba2656932be902da3be10f35b | |
| parent | 4a7909fbbd09e239c5956dd17e89c55a1eb4b9f4 (diff) | |
| download | tcoin-a3c23697851c32be18c8d790a373ab96bb1694f2.tar.gz | |
Adding an option to view the #define configuration without creating any directories
This option was added to allow the #define configuration to be reprinted even if ntcoin was already used to recreate tcoin's subdirectory structure.
| -rwxr-xr-x | ntcoin | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -1,10 +1,27 @@ #!/bin/bash -if [ "$#" -eq 0 ] || [ "${@^}" = "--help" ] || [ "${@^}" = "-h" ] +if [ "$#" -eq 0 ] || [ "$1" = "--help" ] || [ "$1" = "-h" ] then /bin/echo "Usage:" /bin/echo " ntcoin <path (no slash)> <n> : to create tcoin subdirectories in <path (no slash)> with <n> basecoins per user" + /bin/echo " ntcoin <path (no slash)> [ --def | -d ] : to print only the #define preprocessor directives without creating any directories" /bin/echo " ntcoin [ --help | -h ] : to print this help" +elif [ "$2" = "--def" ] || [ "$2" = "-d" ] +then + /bin/echo "Printing tcoin.cpp (and pcoin.cpp) preprocessor directives." + /bin/echo "Paste the following after the #includes inside tcoin.cpp (and pcoin.cpp): +" + /bin/echo '#define TCOIN_PATH "'`/usr/bin/realpath -s $1`'/tcoin" +#define TCOIN_MSG_PATH "'`/usr/bin/realpath -s $1`'/tcoin/messages/" +#define TCOIN_SALT_PATH "'`/usr/bin/realpath -s $1`'/tcoin/salts/" +#define TCOIN_PASS_PATH "'`/usr/bin/realpath -s $1`'/tcoin/passwords/" +#define TCOIN_PROG_ACT_PATH "'`/usr/bin/realpath -s $1`'/tcoin/program_accounting/" +#define PROG_ACT_W_SLASH "program_accounting/" +#define PCOIN_KEY_PATH "'`/usr/bin/realpath -s $1`'/tcoin/secrets/pcoin_keys" +#define TCOIN_CODEZ_PATH "'`/usr/bin/realpath -s $1`'/tcoin/secrets/tcoin_codez" +#define TCOIN_BIN_PATH_W_SPACE "'`/usr/bin/realpath -s $1`'/tcoin/bin/tcoin " +#define TCOIN_PATH_W_SLASH "'`/usr/bin/realpath -s $1`'/tcoin/" +#define TCOIN_SCRYPT_PATH "'`/usr/bin/realpath -s $1`'/tcoin/bin/scrypt"' else if [ -d "`/usr/bin/realpath -s $1`/tcoin" ] then |