Fixes for tilde.guru to tcoin.cpp and ntcoin_freebsd_tildeguru

/usr/bin/whoami doesn't give the euid's username, but the uid's on FreeBSD, so did the same thing I did for tilde.institute, but for tilde.guru too and introduced a new flag for it, TILDEGURU.
This commit is contained in:
login 2021-09-30 15:17:52 +00:00
parent a6d0ab3551
commit 305ab2bd8c
2 changed files with 7 additions and 4 deletions

View File

@ -28,7 +28,8 @@ then
#define TCOIN_HOST_NAME "'$3'"
#define KROWBAR_OFF
#define DA_OFF
#define MINERCOIN_OFF'
#define MINERCOIN_OFF
#define TILDEGURU'
else
#see https://stackoverflow.com/a/3951175
case $3 in
@ -163,7 +164,8 @@ else
#define TCOIN_HOST_NAME "'$4'"
#define KROWBAR_OFF
#define DA_OFF
#define MINERCOIN_OFF' > "`/bin/realpath -q $1`/tcoin/bin/tcoin_defs.cpp"
#define MINERCOIN_OFF
#define TILDEGURU' > "`/bin/realpath -q $1`/tcoin/bin/tcoin_defs.cpp"
/bin/chmod 640 "`/bin/realpath -q $1`/tcoin/bin/tcoin_defs.cpp"
fi
if [ -e "`/bin/realpath -q $1`/tcoin/bin/pcoin_defs.cpp" ]
@ -186,7 +188,8 @@ else
#define PCOIN_BIN_PATH_W_SPACE "'`/bin/realpath -q $2`'/pcoin "
#define KROWBAR_OFF
#define DA_OFF
#define MINERCOIN_OFF' > "`/bin/realpath -q $1`/tcoin/bin/pcoin_defs.cpp"
#define MINERCOIN_OFF
#define TILDEGURU' > "`/bin/realpath -q $1`/tcoin/bin/pcoin_defs.cpp"
/bin/chmod 640 "`/bin/realpath -q $1`/tcoin/bin/pcoin_defs.cpp"
fi
if [ -e "`/bin/realpath -q $1`/tcoin/bin/tcoin" ]

View File

@ -38,7 +38,7 @@
#ifndef KROWBAR_OFF
#define KROWBAR_SCORE_PATH "/home/krowbar/Code/irc/data/tildescores.txt"
#endif
#ifndef TILDEINSTITUTE
#if !defined(TILDEINSTITUTE) || !defined(TILDEGURU)
#define WHOAMI_PATH "/usr/bin/whoami"
#else
#define WHOAMI_PATH "/usr/bin/getent passwd $(/usr/bin/id -ru) | /usr/bin/cut -d: -f1"