Bash Script Structure: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 3: Line 3:
==Bash for Chorke==
==Bash for Chorke==


~/.chorke/
<syntaxhighlight lang="bash">
    ├─ tmp/
# build version
    └─ var/
VERSION=9.99.99
      └─ bash/
          └─ java/
            ├─ com/
            │  ├─ ebis/
            │  └─ ehis/
            └─ org/
                ├─ amqp/
                ├─ core/
                ├─ ecma/
               └─ init/
                  ├─ init
                  ├─ make
                  ├─ make/all
                  ├─ pull
                  ├─ push
                  └─ sync


<syntaxhighlight lang="bash">
# locale bash script path setting
# locale bash script path setting
BASH_HOME=$HOME/.chorke/var/bash
BASH_HOME=$HOME/.chorke/var/bash
Line 29: Line 12:


# remote bash script path setting
# remote bash script path setting
BASH_BASE=http://cdn.chorke.org/bash
BASH_SITE=http://cdn.chorke.org/bash
BASH_SITE=$BASH_BASE/java/init
BASH_BASE=$BASH_SITE/java/init


# remote bash scripts download to locale
# remote bash scripts download to locale
for b in init make pick/make pull push sync;do\
for b in init make pull push sync;do\
     curl "$BASH_SITE/$b>$BASH_PATH/$b";\
     curl -L "$BASH_BASE/$b/$VERSION">"$BASH_PATH/$VERSION/$b";\
done
done
</syntaxhighlight>
</syntaxhighlight>
==Tree for Chorke==
~/.chorke/var/bash/java/
  └─ org/
      ├─ amqp/
      └─ init/
        ├─ 0.00.00/
        ├─ 0.00.01/
        ├─ 9.99.98/
        └─ 9.99.99/
            ├─ init
            ├─ make
            ├─ pull
            ├─ push
            └─ sync


==Bash for Shahed==
==Bash for Shahed==


# bash settings/initialization
<syntaxhighlight lang="bash">
BASH_HOME=$HOME/.shahed/var/bash
# build version
BASH_PATH=$BASH_HOME/php/biz/bash
VERSION=9.99.99
BASH_SITE=http://cdn.chorke.org/bash


# bash script download/copy
# locale bash script path setting
curl $BASH_SITE/php/init>$BASH_PATH/init
BASH_HOME=$HOME/.shahed/var/bash
curl $BASH_SITE/php/make>$BASH_PATH/make
BASH_PATH=$BASH_HOME/php/biz/site
curl $BASH_SITE/php/make>$BASH_PATH/make/option
 
curl $BASH_SITE/php/pull>$BASH_PATH/pull
# remote bash script path setting
curl $BASH_SITE/php/push>$BASH_PATH/push
BASH_SITE=http://cdn.shahed.biz/bash
curl $BASH_SITE/php/sync>$BASH_PATH/sync
BASH_BASE=$BASH_SITE/php/site
 
# remote bash scripts download to locale
for b in init make pull push sync;do\
    curl -L "$BASH_BASE/$b/$VERSION">"$BASH_PATH/$VERSION/$b";\
done
</syntaxhighlight>


  ~/.shahed/
==Tree for Shahed==
    ├─ tmp/
  ~/.shahed/var/bash/php/
    └─ var/
  └─ biz/
      └─ bash/
      ├─ bash/
          └─ php/
      └─ site/
            └─ biz/
        ├─ 0.00.00/
                ├─ site/
        ├─ 0.00.01/
                └─ bash/
        ├─ 9.99.98/
                  ├─ init
        └─ 9.99.99/
                  ├─ make
            ├─ init
                  ├─ make/all
            ├─ make
                  ├─ pull
            ├─ pull
                  ├─ push
            ├─ push
                  └─ sync
            └─ sync

Latest revision as of 10:41, 11 January 2018

Bash for Chorke

# build version
VERSION=9.99.99

# locale bash script path setting
BASH_HOME=$HOME/.chorke/var/bash
BASH_PATH=$BASH_HOME/java/org/init

# remote bash script path setting
BASH_SITE=http://cdn.chorke.org/bash
BASH_BASE=$BASH_SITE/java/init

# remote bash scripts download to locale
for b in init make pull push sync;do\
    curl -L "$BASH_BASE/$b/$VERSION">"$BASH_PATH/$VERSION/$b";\
done

Tree for Chorke

~/.chorke/var/bash/java/
  └─ org/
     ├─ amqp/
     └─ init/
        ├─ 0.00.00/
        ├─ 0.00.01/
        ├─ 9.99.98/
        └─ 9.99.99/
           ├─ init
           ├─ make
           ├─ pull
           ├─ push
           └─ sync

Bash for Shahed

# build version
VERSION=9.99.99

# locale bash script path setting
BASH_HOME=$HOME/.shahed/var/bash
BASH_PATH=$BASH_HOME/php/biz/site

# remote bash script path setting
BASH_SITE=http://cdn.shahed.biz/bash
BASH_BASE=$BASH_SITE/php/site

# remote bash scripts download to locale
for b in init make pull push sync;do\
    curl -L "$BASH_BASE/$b/$VERSION">"$BASH_PATH/$VERSION/$b";\
done

Tree for Shahed

~/.shahed/var/bash/php/
  └─ biz/
     ├─ bash/
     └─ site/
        ├─ 0.00.00/
        ├─ 0.00.01/
        ├─ 9.99.98/
        └─ 9.99.99/
           ├─ init
           ├─ make
           ├─ pull
           ├─ push
           └─ sync