From 68a9844c4fd167b9974a6f8e717b2f469fe7eeef Mon Sep 17 00:00:00 2001 From: "~login@aussies.space" Date: Thu, 14 Nov 2019 11:02:20 +1100 Subject: Increasing reliability of edit_tcoin and edit_pcoin as defined in ntcoin ntcoin creates the scripts edit_tcoin and edit_pcoin. Now, instead of assuming 'nano' is included at /bin/nano, it uses `which nano` to determine where 'nano' is included in the current system. Quotation marks are used around 'nano''s file argument to increase robustness around spaces in file paths. --- ntcoin | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ntcoin') diff --git a/ntcoin b/ntcoin index f8d2585..5d5d0bf 100755 --- a/ntcoin +++ b/ntcoin @@ -192,7 +192,7 @@ else && (/bin/chmod u+s "'`/usr/bin/realpath -s $2`'/tcoin")' > "`/usr/bin/realpath -s $1`/tcoin/bin/compile_tcoin" /bin/chmod 540 "`/usr/bin/realpath -s $1`/tcoin/bin/compile_tcoin" /bin/echo '#!/bin/bash -/bin/nano '`/bin/pwd`'/tcoin.cpp' > "`/usr/bin/realpath -s $1`/tcoin/bin/edit_tcoin" +'`which nano`' "'`/bin/pwd`'/tcoin.cpp"' > "`/usr/bin/realpath -s $1`/tcoin/bin/edit_tcoin" /bin/chmod 540 "`/usr/bin/realpath -s $1`/tcoin/bin/edit_tcoin" /bin/bash "`/usr/bin/realpath -s $1`/tcoin/bin/compile_tcoin" /bin/ln -s "`/usr/bin/realpath -s $1`/tcoin/bin/tcoin" "`/usr/bin/realpath -s $1`/tcoin/bin/compile_tcoin" "`/usr/bin/realpath -s $1`/tcoin/bin/edit_tcoin" ~/bin @@ -212,7 +212,7 @@ else && (/bin/chmod u+s "'`/usr/bin/realpath -s $2`'/pcoin")' > "`/usr/bin/realpath -s $1`/tcoin/bin/compile_pcoin" /bin/chmod 540 "`/usr/bin/realpath -s $1`/tcoin/bin/compile_pcoin" /bin/echo '#!/bin/bash -/bin/nano '`/bin/pwd`'/pcoin.cpp' > "`/usr/bin/realpath -s $1`/tcoin/bin/edit_pcoin" +'`which nano`' "'`/bin/pwd`'/pcoin.cpp"' > "`/usr/bin/realpath -s $1`/tcoin/bin/edit_pcoin" /bin/chmod 540 "`/usr/bin/realpath -s $1`/tcoin/bin/edit_pcoin" /bin/bash "`/usr/bin/realpath -s $1`/tcoin/bin/compile_pcoin" /bin/ln -s "`/usr/bin/realpath -s $1`/tcoin/bin/pcoin" "`/usr/bin/realpath -s $1`/tcoin/bin/compile_pcoin" "`/usr/bin/realpath -s $1`/tcoin/bin/edit_pcoin" ~/bin -- cgit 1.4.1-2-gfad0