From d9207165db84405ac01ab0a5eea92764f5e48e8e Mon Sep 17 00:00:00 2001 From: sthope Date: Sun, 5 Dec 2021 17:01:42 +0100 Subject: [PATCH] initial commit --- files/amd64/noso-go.sh | 2 +- script.sh | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/files/amd64/noso-go.sh b/files/amd64/noso-go.sh index 2dc50c4..055e26a 100755 --- a/files/amd64/noso-go.sh +++ b/files/amd64/noso-go.sh @@ -6,7 +6,7 @@ POOL="devnoso" #POOL="russiapool" #POOL="CryptoCribRO" WALLET="" -CPU=4 +CPU= for wallet in ${WALLET:?Variable not set or is empty}; do wallets+=" --wallet $wallet" diff --git a/script.sh b/script.sh index 3b07dd2..87cc094 100755 --- a/script.sh +++ b/script.sh @@ -9,7 +9,11 @@ amd64_script="https://git.sthope.dev/sthope/DockerContainer-Noso/raw/branch/master/files/amd64/noso-go" amd64_nano="https://git.sthope.dev/sthope/DockerContainer-Noso/raw/branch/master/files/amd64/noso-go.sh" +noso_script="noso-go" +noso_nano="noso-go.sh" + WALLET="$1" +CPU=4 # NOSO_DIR="~/noso/" NOSO_DIR="noso" @@ -24,4 +28,14 @@ wget -q "$amd64_script" wget -q "$amd64_nano" chmod a+x noso-go* -ls -l \ No newline at end of file + + +variable=( '${WALLET}' '${CPU}' ) + +text=$(cat $noso_nano) +while read line +do + value=$(eval echo $line) + text=$(sed "s/$line/$value/g" <<< "$text") +done < "$variable" +echo "$text" > output.sh \ No newline at end of file