diff options
-rwxr-xr-x | init.sh | 16 | ||||
-rwxr-xr-x | install.sh | 26 | ||||
-rwxr-xr-x | ipfs-check-install-setup-init-update | 4 | ||||
-rwxr-xr-x | update.sh | 2 |
4 files changed, 24 insertions, 24 deletions
@@ -50,13 +50,13 @@ printf "Initialization started... \n" ak_gpg_check_or_create -if [[ -f $AK_ZGENESIS ]] ; then printf "%s" "$(ipfs add -q $AK_GENESIS)" > $AK_ZGENESIS;fi -if [[ ! -f $AK_ZCHAIN ]] ; then printf "%s" "$(ipfs key gen zchain)" > $AK_ZCHAIN;fi -if [[ ! -f $AK_ZLATEST ]] ; then cp $AK_ZGENESIS $AK_ZLATEST;fi -if [[ ! -f $AK_ZCHAINASC ]] ; then gpg2 --homedir $AK_GPGHOME -bao $AK_ZCHAINASC $AK_ZCHAIN;fi -if [[ ! -f $AK_ZZCHAIN ]] ; then printf "%s" "$(ipfs add -q $AK_ZCHAINASC)" > $AK_ZZCHAIN;fi -if [[ ! -f $AK_GENESISASC ]] ; then gpg2 --homedir $AK_GPGHOME -bao $AK_GENESISASC $AK_GENESIS;fi -if [[ ! -f $AK_ZGENESISASC ]] ; then printf "%s" "$(ipfs add -q $AK_GENESISASC)" > $AK_ZGENESISASC;fi +if [ -f $AK_ZGENESIS ] ; then printf "%s" "$(ipfs add -q $AK_GENESIS)" > $AK_ZGENESIS;fi +if [ ! -f $AK_ZCHAIN ] ; then printf "%s" "$(ipfs key gen zchain)" > $AK_ZCHAIN;fi +if [ ! -f $AK_ZLATEST ] ; then cp $AK_ZGENESIS $AK_ZLATEST;fi +if [ ! -f $AK_ZCHAINASC ] ; then gpg2 --homedir $AK_GPGHOME -bao $AK_ZCHAINASC $AK_ZCHAIN;fi +if [ ! -f $AK_ZZCHAIN ] ; then printf "%s" "$(ipfs add -q $AK_ZCHAINASC)" > $AK_ZZCHAIN;fi +if [ ! -f $AK_GENESISASC ] ; then gpg2 --homedir $AK_GPGHOME -bao $AK_GENESISASC $AK_GENESIS;fi +if [ ! -f $AK_ZGENESISASC ] ; then printf "%s" "$(ipfs add -q $AK_GENESISASC)" > $AK_ZGENESISASC;fi ipfs_zarchive_check_or_mkdir @@ -70,7 +70,7 @@ ipfs_zlatest_check_or_create binfiles=$(ls -1 $(pwd)/bin) for b in $binfiles do - if [[ ! -L $AK_BINDIR/$b ]] + if [ ! -L $AK_BINDIR/$b ] then printf "Creating symlink to %s..." "$b" ln -s $(pwd)/bin/$b $AK_BINDIR/$b @@ -2,19 +2,19 @@ source ./config.sh printf "%s" $(pwd) > wam WHEREAMI="$(cat wam)" -if [[ ! -d $AK_WORKDIR ]] ; then mkdir $AK_WORKDIR ;fi -if [[ ! -d $AK_CONFIGDIR ]] ; then mkdir $AK_CONFIGDIR ;fi -if [[ ! -d $AK_BINDIR ]]; then mkdir $AK_BINDIR ;fi -if [[ ! -d $AK_ZBLOCKDIR ]]; then mkdir $AK_ZBLOCKDIR ;fi -if [[ ! -d $AK_BLOCKDIR ]]; then mkdir $AK_BLOCKDIR ;fi -if [[ ! -d $AK_DATADIR ]]; then mkdir $AK_DATADIR ;fi -if [[ ! -d $AK_ARCHIVESDIR ]]; then mkdir $AK_ARCHIVESDIR ;fi -if [[ ! -f $AK_LOGSFILE ]]; then touch $AK_LOGSFILE ;fi -if [[ ! -f $AK_GENESIS ]]; then touch $AK_GENESIS;fi -if [[ ! -f $AK_MINEDBLOCKS ]]; then mkdir $AK_MINEDBLOCKS; fi -if [[ ! -f $AK_ZBLOCKSFILE ]]; then mkdir $AK_ZBLOCKSFILE; fi -if [[ ! -f $AK_ZPAIRSFILE ]]; then mkdir $AK_ZPAIRSFILE; fi -if [[ ! -d $AK_GPGHOME ]]; then mkdir $AK_GPGHOME && chmod 700 -R $AK_GPGHOME; fi +if [ ! -d $AK_WORKDIR ] ; then mkdir $AK_WORKDIR ;fi +if [ ! -d $AK_CONFIGDIR ] ; then mkdir $AK_CONFIGDIR ;fi +if [ ! -d $AK_BINDIR ]; then mkdir $AK_BINDIR ;fi +if [ ! -d $AK_ZBLOCKDIR ]; then mkdir $AK_ZBLOCKDIR ;fi +if [ ! -d $AK_BLOCKDIR ]; then mkdir $AK_BLOCKDIR ;fi +if [ ! -d $AK_DATADIR ]; then mkdir $AK_DATADIR ;fi +if [ ! -d $AK_ARCHIVESDIR ]; then mkdir $AK_ARCHIVESDIR ;fi +if [ ! -f $AK_LOGSFILE ]; then touch $AK_LOGSFILE ;fi +if [ ! -f $AK_GENESIS ]; then touch $AK_GENESIS;fi +if [ ! -f $AK_MINEDBLOCKS ]; then mkdir $AK_MINEDBLOCKS; fi +if [ ! -f $AK_ZBLOCKSFILE ]; then mkdir $AK_ZBLOCKSFILE; fi +if [ ! -f $AK_ZPAIRSFILE ]; then mkdir $AK_ZPAIRSFILE; fi +if [ ! -d $AK_GPGHOME ]; then mkdir $AK_GPGHOME && chmod 700 -R $AK_GPGHOME; fi touch $AK_WORKDIR/logs logthis(){ diff --git a/ipfs-check-install-setup-init-update b/ipfs-check-install-setup-init-update index 6c30f2d..219e898 100755 --- a/ipfs-check-install-setup-init-update +++ b/ipfs-check-install-setup-init-update @@ -1,6 +1,6 @@ #!/bin/bash -if [[ ! -d $AK_BINDIR ]]; then mkdir $AK_BINDIR ;fi -if [[ ! -d $AK_ARCHIVESDIR ]]; then mkdir $AK_ARCHIVESDIR ;fi +if [ ! -d $AK_BINDIR ]; then mkdir $AK_BINDIR ;fi +if [ ! -d $AK_ARCHIVESDIR ]; then mkdir $AK_ARCHIVESDIR ;fi logthis(){ echo "$(date -u +%s) $1 $2" >> $AK_WORKDIR/logs } @@ -5,5 +5,5 @@ binfiles=$(ls -1 $(pwd)/bin) for b in $binfiles do - if [[ ! -L $AK_BINDIR/$b ]] ; then ln -s $(pwd)/bin/$b $AK_BINDIR/$b ;fi + if [ ! -L $AK_BINDIR/$b ] ; then ln -s $(pwd)/bin/$b $AK_BINDIR/$b ;fi done |