Skip to content
Permalink
Browse files

fixing make deploy for ubuntu 16

  • Loading branch information...
licobc committed Oct 9, 2019
1 parent 80c1d7f commit 2f4be4114cae4c6fe1d9dc278a2ecaaae0eaf7b8
Showing with 84 additions and 1 deletion.
  1. +1 −1 share/debian/debian/install
  2. +83 −0 tools/sendcoins_1000_to_2000.sh
@@ -9,4 +9,4 @@ kore-qt.png /usr/local/share/kore/
../tor-browser-conf/local-settings.js /usr/local/share/kore/torbrowser-setup/
../tor-browser-conf/mozilla.cfg /usr/local/share/kore/torbrowser-setup/
../tor-browser-conf/user.js /usr/local/share/kore/torbrowser-setup/
../tor-browser-conf/{f47ca0a8-45b9-467e-8e4f-00d4fdb5acf1}.xpi /usr/local/share/kore/torbrowser-setup/
../tor-browser-conf/\{f47ca0a8-45b9-467e-8e4f-00d4fdb5acf1\}.xpi /usr/local/share/kore/torbrowser-setup/
@@ -0,0 +1,83 @@
#!/bin/bash
set -e

cli="../src/kore-cli -testnet"

array_value=(1000 1050 1100 1150 1200 1300 1450 1500 1550 1600 1700 1800 1900 2000)
array_address=(4 2 5 2 8 2 2 7 2 3 2 3 2 10)

number_of_addressess=$( IFS="+"; bc <<< "${array_address[*]}" )

# Let's compute the amount to send
x=0
total_to_send=0

while [ $x -le $[${#array_value[@]}-1] ]; do
value=${array_value[$x]}
addressess=${array_address[$x]}
total_to_send=$(($total_to_send + $value*$addressess ))
x=$(( $x+1 ))
done

if [ $# -lt 1 ]
then
echo "This script will send $total_to_send splitted into $number_of_addressess addressess"
echo "Please make sure that you have this amount in this wallet, prepare a <file> with $number_of_addressess addressess"
echo "Call $0 <file>"
exit 1
fi

# Read the file into addressess array
mapfile -t addressess < $1

if [ ${#addressess[@]} -ne $number_of_addressess ]
then
echo "The file should have one address per line, total of $number_of_addressess addressess"
exit 1
fi

total=$[${#array_address[@]} - 1]
if [ $# -gt 1 ]
then
# The previous execution was not able to finish and we need to continue sending money from where it stopped
# the idea here is to finished the last loop, and continue from the next element
k=$2
i=$3
j=$4
# let's finish the last loop
times=$[${array_address[$i]} -1]
while [ $j -le $times ]; do
echo "$k sendtoaddress ${addressess[$k]} ${array_value[$i]}, on error call: $0 $1 $k $i $j"
txid=`$cli sendtoaddress ${addressess[$k]} ${array_value[$i]}`
echo "txid=$txid"
k=$[k+1]
j=$(( $j+1 ))
sleep 1
done
i=$(( $i+1 ))
sleep 5
else
# First time executing the script
# k point to the address we want to send the money
k=0
i=0
fi

## main loop to send money
while [ $i -le $total ]; do
# number of times we need to send the same amount
j=0
times=$[${array_address[$i]} -1]
while [ $j -le $times ]; do
echo "$k sendtoaddress ${addressess[$k]} ${array_value[$i]}, on error call: $0 $1 $k $i $j"
txid=`$cli sendtoaddress ${addressess[$k]} ${array_value[$i]}`
echo "txid=$txid"
k=$[k+1]
j=$(( $j+1 ))
sleep 1
done
i=$(( $i+1 ))
sleep 5
done
echo "Congratulations you have sent all the money!!!"
exit 0

0 comments on commit 2f4be41

Please sign in to comment.
You can’t perform that action at this time.