Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- run_nodeapp() {
- cd $PROJECT/$1/$2
- if [[ $3 == -u ]]; then
- yarn
- else
- yarn dev
- fi
- }
- goto_dir() {
- cd $PROJECT/$1
- }
- create_dir() {
- mkdir -p $PROJECT/$1
- }
- clone_beeketing() {
- cd $BEEKETING_PATH
- git clone git@bitbucket.org:brodev/beeketing-dashboard.git
- git clone git@bitbucket.org:brodev/beeketing-sdk.git
- }
- clone_sitekit() {
- cd $SITEKIT_PATH
- git clone git@bitbucket.org:brodev/sitekit-dashboard.git
- git clone git@bitbucket.org:brodev/sitekit-sdk.git
- }
- clone_capp() {
- cd $CAPP_PATH
- git clone git@bitbucket.org:brodev/capp-dashboard.git
- git clone git@bitbucket.org:brodev/capp-sdk.git
- }
- clone_copt() {
- cd $COPT_PATH
- git clone git@bitbucket.org:brodev/copt-dashboard.git
- }
- PROJECT=/mnt/d/Project
- BEEKETING_PATH=$PROJECT/beeketing
- SITEKIT_PATH=$PROJECT/sitekit
- CAPP_PATH=$PROJECT/capp
- COPT_PATH=$PROJECT/copt
- case "$1" in
- clone)
- if [ -z $2 ]; then
- clone_beeketing
- clone_sitekit
- clone_capp
- fi
- case "$2" in
- beeketing)
- clone_beeketing
- ;;
- sitekit)
- clone_sitekit
- ;;
- capp)
- clone_capp
- ;;
- esac
- ;;
- create)
- mkdir -p ~/Project
- if [ -z $2 ]; then
- create_dir beeketing
- create_dir sitekit
- create_dir capp
- create_dir copt
- exit 0
- fi
- create_dir $2
- ;;
- goto)
- case "$2" in
- beeketing|sitekit|capp|copt)
- goto_dir $2
- ;;
- go)
- cd $PROJECT/go/src/bkgo
- ;;
- esac
- ;;
- run)
- run_nodeapp $2 $3 $4
- ;;
- esac
- exec bash
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement