aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinit.sh16
-rwxr-xr-xinstall.sh26
-rwxr-xr-xipfs-check-install-setup-init-update4
-rwxr-xr-xupdate.sh2
4 files changed, 24 insertions, 24 deletions
diff --git a/init.sh b/init.sh
index 9458140..e1c42b1 100755
--- a/init.sh
+++ b/init.sh
@@ -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
diff --git a/install.sh b/install.sh
index 3738def..131b219 100755
--- a/install.sh
+++ b/install.sh
@@ -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
}
diff --git a/update.sh b/update.sh
index 945174c..06624da 100755
--- a/update.sh
+++ b/update.sh
@@ -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