diff options
author | ~login@aussies.space <login@aussies.space> | 2019-11-14 11:02:20 +1100 |
---|---|---|
committer | ~login@aussies.space <login@aussies.space> | 2019-11-14 11:02:20 +1100 |
commit | 68a9844c4fd167b9974a6f8e717b2f469fe7eeef (patch) | |
tree | e43d505696f40698386decf200b653719d98a004 /ntcoin | |
parent | e0d4852f2792eea07e827f29803ba6b30e16f919 (diff) | |
download | tcoin-68a9844c4fd167b9974a6f8e717b2f469fe7eeef.tar.gz |
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.
Diffstat (limited to 'ntcoin')
-rwxr-xr-x | ntcoin | 4 |
1 files changed, 2 insertions, 2 deletions
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 |