diff --git a/doc/ssb-g1like-logo.png b/doc/ssb-g1like-logo.png new file mode 100644 index 0000000..966b711 Binary files /dev/null and b/doc/ssb-g1like-logo.png differ diff --git a/process-likes-g1-install.sh b/process-likes-g1-install.sh index c43eac3..a37ace0 100644 --- a/process-likes-g1-install.sh +++ b/process-likes-g1-install.sh @@ -17,13 +17,6 @@ fn_exists() { [ `type -t $1`"" == 'file' ] } - -# INSTALL build-essential - -if ! dpkg -s build-essential; then - sudo apt install build-essential -y -fi - # INSTALL silkaj if ! fn_exists silkaj; then echo "INSTALL silkaj" @@ -32,6 +25,13 @@ sudo apt install python3-pip python3-setuptools python3-wheel -y && pip3 install echo 'PATH=$PATH:.local/bin' >> ~/.bashrc && source ~/.bashrc fi + +# INSTALL build-essential + +if ! dpkg -s build-essential; then + sudo apt install build-essential -y +fi + # INSTALL sbotc if ! fn_exists sbotc; then sudo apt install libsodium-dev jq -y @@ -46,6 +46,39 @@ fi ####################### G1 SSB ACCOUNT MANAGER ############################################ ########################################################################################### + + +# If user already has an SSB account, we generate Duniter secret key from SSB secret key +if [[ -f ~/.ssb/secret ]]; then + + +ssbpub=$(cat ~/.ssb/secret | grep public\" | cut -d ' ' -f 4 | cut -d '.' -f 1 | sed s/\"//g) +ssbpriv=$(cat ~/.ssb/secret | grep private\" | cut -d ' ' -f 4 | cut -d '.' -f 1 | sed s/\"//g) +g1pub=$(echo $ssbpub | base64 -d | base58) +g1priv=$(echo $ssbpriv | base64 -d | base58) + +cat > ~/.ssb/secret.dunikey < ~/.ssb/secret < ~/.ssb/secret.dunikey < ~/.ssb/secret.dunikey <