From fca67511839b31ef2eb60ab4ef088c3fcd8d39ee Mon Sep 17 00:00:00 2001 From: poka Date: Wed, 20 May 2020 02:56:59 +0200 Subject: [PATCH] Fix install --- .install/ipfs_alone.sh | 2 +- debug/reset_ipfs.sh | 4 ++-- debug/reset_ssb.sh | 5 +++++ install.sh | 6 +++--- 4 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 debug/reset_ssb.sh diff --git a/.install/ipfs_alone.sh b/.install/ipfs_alone.sh index 2eb19a0..05ded71 100644 --- a/.install/ipfs_alone.sh +++ b/.install/ipfs_alone.sh @@ -17,7 +17,7 @@ sudo true ## Error funciton err() { - echo "${c_red}$1$c_" + echo -e "${c_red}$1$c_" exit 1 } diff --git a/debug/reset_ipfs.sh b/debug/reset_ipfs.sh index b310ac5..0effc67 100644 --- a/debug/reset_ipfs.sh +++ b/debug/reset_ipfs.sh @@ -8,5 +8,5 @@ shopt -s extglob cd /home/$YOU || exit 1 rm -rf .ipfs/ -cd .zen || exit 1 -rm -rf !(astroport) +[[ -d .zen ]] && cd .zen || exit 1 +[[ $(echo "${PWD##*/}") == .zen ]] && rm -rf !(astroport) diff --git a/debug/reset_ssb.sh b/debug/reset_ssb.sh new file mode 100644 index 0000000..0f86809 --- /dev/null +++ b/debug/reset_ssb.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +stamp=$(date +%s) + +[[ -d ~/.ssb ]] && mv ~/.ssb ~/.ssb-$stamp || exit 1 diff --git a/install.sh b/install.sh index 65aae6f..74664df 100644 --- a/install.sh +++ b/install.sh @@ -14,7 +14,7 @@ curl -s $gitpath/.install/export_colors.sh | bash || exit 1 . ~/.bash_aliases # IPFS install -echo "${c_green}Astroport installer +echo -e "${c_green}Astroport installer ### 1. IPFS Swarm Layer$c_" # Full automatic (you trust this git depot) @@ -24,11 +24,11 @@ curl -s $gitpath/.install/ipfs_alone.sh | bash || exit 1 curl -s $gitpath/.install/sys_checkOS.sh noexec | bash || exit 1 # SSB install -echo "${c_green}2. Ḡ1/ScuttleButt anoptical layer$c_" +echo -e "${c_green}2. Ḡ1/ScuttleButt anoptical layer$c_" # ONCE YOU READ and AGREE. Run TrustFull QUICK Install !! curl -s $gitpath/zen/tools/make_G1SSB_secret.sh | bash || exit 1 -echo "${c_green}Installation complete$c_" +echo -e "${c_green}Installation complete$c_" exec bash