Fixed -h option

This commit is contained in:
Luca Frosini 2019-10-09 16:42:56 +02:00
parent 619c9c8f2e
commit 68973b169b
1 changed files with 11 additions and 12 deletions

View File

@ -1,5 +1,5 @@
#!/bin/bash
USERNAME=luca.frosini
USERNAME=
AUTHORS_FILE=authors.txt
SVN_URL=""
SVN_PROJECT_LOCAL_DIR=""
@ -9,8 +9,8 @@ AUTHORS_OK=false
POM_FILE=pom.xml
OLD_MAVEN_PARENT_VERSION="1.0.0"
NEW_MAVEN_PARENT_VERSION="1.1.0-SNAPSHOT"
GITEA_TOKEN=""
NEW_MAVEN_PARENT_VERSION="1.1.0"
GITEA_TOKEN=
GIT_OK=false
@ -216,10 +216,10 @@ function showhelp {
echo " -u <USERNAME> for git svn clone command e.g. luca.frosini"
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:a" opt; do
while getopts ":i:s:p:u:g:a:h" opt; do
case $opt in
i) INIT=true;;
s) SVN_URL=$OPTARG;;
@ -227,12 +227,11 @@ while getopts ":s:p:u:h:g:a" opt; do
u) USERNAME=$OPTARG;;
g) GIT_REPOSITORY_DIRECTORY_NAME=$OPTARG;;
a) AUTHORS_OK=true;;
h) showhelp
exit 0 ;;
\?) echo -e "\nERROR:invalid option: -$OPTARG";
h) showhelp;
exit ;;
?) echo -e "\nERROR:invalid option: -$OPTARG";
showhelp;
echo -e "\naborting.\n"
exit 1 >&2 ;;
exit 1 >&2;;
esac
done
@ -313,4 +312,4 @@ rm -rf $MIGRATION_DIRECTORY
echo "Well Done"
echo "Please configure the Jenkins Building system for your project at https://jenkins.d4science.org/ See how to do it at https://wiki.gcube-system.org/gcube/Jenkins_Projects_(aka_Jobs)"
echo "Please Add Webhhoks on Gitea at https://code-repo.d4science.org/gCubeSystem/${GIT_REPOSITORY_DIRECTORY_NAME} See hot to do it at https://wiki.gcube-system.org/gcube/Gitea/Jenkins:_Setting_up_Webhooks#Webhook_on_the_Gitea_repository"
echo "Please Add Webhhoks on Gitea at https://code-repo.d4science.org/gCubeSystem/${GIT_REPOSITORY_DIRECTORY_NAME} See how to do it at https://wiki.gcube-system.org/gcube/Gitea/Jenkins:_Setting_up_Webhooks#Webhook_on_the_Gitea_repository"