Added the possibility to skip the author file check.

This commit is contained in:
Luca Frosini 2019-07-22 11:36:35 +02:00
parent 90cae1e849
commit e6601aa7c3
1 changed files with 8 additions and 5 deletions

View File

@ -5,6 +5,7 @@ SVN_URL=""
SVN_PROJECT_LOCAL_DIR="" SVN_PROJECT_LOCAL_DIR=""
GIT_REPOSITORY_DIRECTORY_NAME="" GIT_REPOSITORY_DIRECTORY_NAME=""
WORKSPACE=~/workspace WORKSPACE=~/workspace
AUTHORS_OK=false
POM_FILE=pom.xml POM_FILE=pom.xml
OLD_MAVEN_PARENT_VERSION="1.0.0" OLD_MAVEN_PARENT_VERSION="1.0.0"
@ -23,7 +24,7 @@ function git_repository {
GIT_OK=true; GIT_OK=true;
break;; break;;
No ) No )
echo "Please created it at https://code-repo.d4science.org/gCubeSystem/ and select yes to continue. See how to do it at https://wiki.gcube-system.org/gcube/Git_Repositories#Create_a_New_Repository" echo "Please created it at https://code-repo.d4science.org/repo/create?org=5722 and select yes to continue. See how to do it at https://wiki.gcube-system.org/gcube/Git_Repositories#Create_a_New_Repository"
GIT_OK=false GIT_OK=false
break;; break;;
Abort ) Abort )
@ -35,9 +36,9 @@ function git_repository {
} }
function authors { function authors {
local AUTHORS_OK=false if [ "$AUTHORS_OK" = false ]; then
read -p "By continuing you will be able to check the authors file with 'less' command (type ENTER to continue)."
read -p "By continuing you will be able to check the authors file with 'less' command (type ENTER to continue)." fi
while [ "$AUTHORS_OK" = false ] while [ "$AUTHORS_OK" = false ]
do do
@ -175,16 +176,18 @@ function showhelp {
echo " -p <SVN_PROJECT_LOCAL_DIR> The path to the local project actually on SVN" echo " -p <SVN_PROJECT_LOCAL_DIR> The path to the local project actually on SVN"
echo " -u <USERNAME> for git svn clone command e.g. luca.frosini" echo " -u <USERNAME> for git svn clone command e.g. luca.frosini"
echo " -g <GIT_REPOSITORY_DIRECTORY_NAME>" echo " -g <GIT_REPOSITORY_DIRECTORY_NAME>"
echo " -a does not request to check the author file"
echo -e " -h = shows this help.\n" echo -e " -h = shows this help.\n"
} }
while getopts ":s:p:u:h:g" opt; do while getopts ":s:p:u:h:g:a" opt; do
case $opt in case $opt in
i) INIT=true;; i) INIT=true;;
s) SVN_URL=$OPTARG;; s) SVN_URL=$OPTARG;;
p) SVN_PROJECT_LOCAL_DIR=$OPTARG;; p) SVN_PROJECT_LOCAL_DIR=$OPTARG;;
u) USERNAME=$OPTARG;; u) USERNAME=$OPTARG;;
g) GIT_REPOSITORY_DIRECTORY_NAME=$OPTARG;; g) GIT_REPOSITORY_DIRECTORY_NAME=$OPTARG;;
a) AUTHORS_OK=true;;
h) showhelp h) showhelp
exit 0 ;; exit 0 ;;
\?) echo -e "\nERROR:invalid option: -$OPTARG"; \?) echo -e "\nERROR:invalid option: -$OPTARG";