|  | #!/bin/bash | 
        
          |  | # generate mvp folders and classes for screens component | 
        
          |  |  | 
        
          |  | ############### | 
        
          |  | ##screen name | 
        
          |  | PARENT_FOLDER=$1 | 
        
          |  | ############### | 
        
          |  | ##activity name | 
        
          |  | ACTIVITY_NAME=$2 | 
        
          |  | ############### | 
        
          |  | ##package | 
        
          |  | PROJECT_NAME=$3 | 
        
          |  |  | 
        
          |  | ############### | 
        
          |  | ##help | 
        
          |  | if [ "$1" == "-h" ]; then | 
        
          |  | echo -e "Usage: mvp-folder PARENT_FOLDER ACTIVITY_NAME PROJECT_NAME\n\t\t PARENT_FOLDER - screen name\n\t\t ACTIVITY_NAME - activity name\n\t\t PROJECT_NAME - project name" | 
        
          |  | exit 0 | 
        
          |  | fi | 
        
          |  |  | 
        
          |  | ######################### | 
        
          |  | ##generate folders | 
        
          |  | mkdir -p ${PARENT_FOLDER}/di/ | 
        
          |  | mkdir -p ${PARENT_FOLDER}/model/entity | 
        
          |  | mkdir -p ${PARENT_FOLDER}/model/interfaces | 
        
          |  |  | 
        
          |  | mkdir -p ${PARENT_FOLDER}/presenter/interfaces | 
        
          |  |  | 
        
          |  | mkdir -p ${PARENT_FOLDER}/view/delegate | 
        
          |  | mkdir -p ${PARENT_FOLDER}/view/activity | 
        
          |  | mkdir -p ${PARENT_FOLDER}/view/adapter | 
        
          |  | mkdir -p ${PARENT_FOLDER}/view/fragment | 
        
          |  |  | 
        
          |  | ######################### | 
        
          |  | ##generate classes | 
        
          |  |  | 
        
          |  | ############### | 
        
          |  | ##model class | 
        
          |  | echo "package com.${PROJECT_NAME}.screens.${PARENT_FOLDER}.model; | 
        
          |  |  | 
        
          |  | import com.${PROJECT_NAME}.screens.${PARENT_FOLDER}.model.interfaces.I${ACTIVITY_NAME}Model; | 
        
          |  |  | 
        
          |  | public class ${ACTIVITY_NAME}Model implements I${ACTIVITY_NAME}Model{ | 
        
          |  |  | 
        
          |  | }" >>${PARENT_FOLDER}/model/"${ACTIVITY_NAME}Model.java" | 
        
          |  |  | 
        
          |  | ############### | 
        
          |  | ##presenter class | 
        
          |  | echo "package com.${PROJECT_NAME}.screens.${PARENT_FOLDER}.presenter; | 
        
          |  |  | 
        
          |  | import com.${PROJECT_NAME}.screens.${PARENT_FOLDER}.presenter.interfaces.I${ACTIVITY_NAME}Presenter; | 
        
          |  |  | 
        
          |  | public class ${ACTIVITY_NAME}Presenter implements I${ACTIVITY_NAME}Presenter{ | 
        
          |  |  | 
        
          |  | }" >>${PARENT_FOLDER}/presenter/"${ACTIVITY_NAME}Presenter.java" | 
        
          |  |  | 
        
          |  |  | 
        
          |  | ############### | 
        
          |  | ##di class | 
        
          |  | echo "package com.${PROJECT_NAME}.screens.${PARENT_FOLDER}.di; | 
        
          |  |  | 
        
          |  | import dagger.Module; | 
        
          |  |  | 
        
          |  | @Module | 
        
          |  | public abstract class ${ACTIVITY_NAME}Module { | 
        
          |  |  | 
        
          |  | }" >>${PARENT_FOLDER}/di/"${ACTIVITY_NAME}Module.java" | 
        
          |  |  | 
        
          |  |  | 
        
          |  | ######################### | 
        
          |  | ##generate interfaces | 
        
          |  |  | 
        
          |  | ############### | 
        
          |  | ##model interface | 
        
          |  | echo "package com.${PROJECT_NAME}.screens.${PARENT_FOLDER}.model.interfaces; | 
        
          |  |  | 
        
          |  | public interface I${ACTIVITY_NAME}Model{ | 
        
          |  |  | 
        
          |  | }" >>${PARENT_FOLDER}/model/interfaces/"I${ACTIVITY_NAME}Model.java" | 
        
          |  |  | 
        
          |  | ############### | 
        
          |  | ##presenter interface | 
        
          |  | echo "package com.${PROJECT_NAME}.screens.${PARENT_FOLDER}.presenter.interfaces; | 
        
          |  |  | 
        
          |  | public interface I${ACTIVITY_NAME}Presenter{ | 
        
          |  |  | 
        
          |  | }" >>${PARENT_FOLDER}/presenter/interfaces/"I${ACTIVITY_NAME}Presenter.java" | 
        
          |  |  | 
        
          |  |  | 
        
          |  | ############### | 
        
          |  | ##view interface | 
        
          |  | echo "package com.${PROJECT_NAME}.screens.${PARENT_FOLDER}.view.delegate; | 
        
          |  |  | 
        
          |  | public interface I${ACTIVITY_NAME}ViewDelegate{ | 
        
          |  |  | 
        
          |  | }" >>${PARENT_FOLDER}/view/delegate/"I${ACTIVITY_NAME}ViewDelegate.java" |