aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlogin (tilde.temm) <login@tilde.team>2019-11-15 22:12:37 -0500
committerlogin (tilde.temm) <login@tilde.team>2019-11-15 22:13:00 -0500
commit8ca24f8f34261d029fcb11b710345840f76cbbe5 (patch)
tree1bba67322c902f5e13e42455583d222409e4083d
parentfe25995df346c75661f2e657dcdd5aee8ea6d4a2 (diff)
downloadtcoin-8ca24f8f34261d029fcb11b710345840f76cbbe5.tar.gz
Fixed small error in ntcoin
A small error was present in ntcoin, where a chmod on a file that may not exist was blocking the execution of future commands due to failing. Now, the command is always set to succeed.
-rwxr-xr-xntcoin4
1 files changed, 2 insertions, 2 deletions
diff --git a/ntcoin b/ntcoin
index 02e0143..a54bf2d 100755
--- a/ntcoin
+++ b/ntcoin
@@ -188,7 +188,7 @@ else
(/usr/bin/g++ -I"'`/usr/bin/realpath -s $1`'/tcoin/bin" "'`/bin/pwd`'/tcoin.cpp" -o "'`/usr/bin/realpath -s $1`'/tcoin/bin/tcoin" -std=c++11) \
&& (/bin/chmod 550 "'`/usr/bin/realpath -s $1`'/tcoin/bin/tcoin") \
&& (/bin/chmod u+s "'`/usr/bin/realpath -s $1`'/tcoin/bin/tcoin") \
-&& (/bin/chmod u+w "'`/usr/bin/realpath -s $2`'/tcoin") \
+&& (([ -f "'`/usr/bin/realpath -s $2`'/tcoin" ] && (/bin/chmod u+w "'`/usr/bin/realpath -s $2`'/tcoin")) || /bin/true) \
&& (/bin/cp "'`/usr/bin/realpath -s $1`'/tcoin/bin/tcoin" "'`/usr/bin/realpath -s $2`'/tcoin") \
&& (/bin/chmod 550 "'`/usr/bin/realpath -s $2`'/tcoin") \
&& (/bin/chmod u+s "'`/usr/bin/realpath -s $2`'/tcoin")' > "`/usr/bin/realpath -s $1`/tcoin/bin/compile_tcoin"
@@ -209,7 +209,7 @@ else
(/usr/bin/g++ -I"'`/usr/bin/realpath -s $1`'/tcoin/bin" "'`/bin/pwd`'/pcoin.cpp" -o "'`/usr/bin/realpath -s $1`'/tcoin/bin/pcoin" -std=c++11) \
&& (/bin/chmod 550 "'`/usr/bin/realpath -s $1`'/tcoin/bin/pcoin") \
&& (/bin/chmod u+s "'`/usr/bin/realpath -s $1`'/tcoin/bin/pcoin") \
-&& (/bin/chmod u+w "'`/usr/bin/realpath -s $2`'/pcoin") \
+&& (([ -f "'`/usr/bin/realpath -s $2`'/pcoin" ] && (/bin/chmod u+w "'`/usr/bin/realpath -s $2`'/pcoin")) || /bin/true) \
&& (/bin/cp "'`/usr/bin/realpath -s $1`'/tcoin/bin/pcoin" "'`/usr/bin/realpath -s $2`'/pcoin") \
&& (/bin/chmod 550 "'`/usr/bin/realpath -s $2`'/pcoin") \
&& (/bin/chmod u+s "'`/usr/bin/realpath -s $2`'/pcoin")' > "`/usr/bin/realpath -s $1`/tcoin/bin/compile_pcoin"