Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 921915da authored by Achraf Achkari's avatar Achraf Achkari
Browse files

Adapt generation utility for DGSANTE

parent 3efee039
No related branches found
No related tags found
2 merge requests!2Release GOC,!1Release GOC
......@@ -6,6 +6,44 @@ GREEN='\033[0;32m'
ORANGE='\033[0;33m'
NC='\033[0m'
# Try to get the jar of GOC automatically
jarPath=`ls -l | grep -oh -e "[^ ]*-jar-with-dependencies\.jar"`
if [ -z $jarPath ]; then
echo -e "${RED}Could not detect the JAR of GOC, please provide the path manually"
read -r jarPath
else
absJarPath=`realpath $jarPath`
echo -e "${NC}A GOC JAR has been detected at: (${jarPath}) want you to use it?"
printf "hit enter for yes, enter an other path to change it: "
read -r newJarPath
if [ ! -z $newJarPath ]; then
isAbsPath=`echo "${newJarPath}" | grep ^/.* | wc -l`
if [ $isAbsPath -eq 0 ]; then
echo -e "${RED}[ ${newJarPath} ] is not an absolute path"
exit 0
fi
absJarPath=$newJarPath
fi
fi
#Try to get maven path automatically
mavenPath=`mvn -v | sed -n 2p | grep -oh -e "/.*"`
if [ -z $mavenPath ];then
echo -e "${NC}Could not detect a maven installation, please enter the absolute to the binary file of maven: "
read -r mavenPath
testMaven=`${mavenPath} -v`
if [ -z $testMaven ];then
echo -e "${NC}Wrong maven executable..."
exit 1
fi
else
mavenPath="${mavenPath}/bin/mvn"
fi
echo -e "${NC}Using maven at: ${mavenPath}"
printf "Please enter a path to your BBR (Absolute Path) : "
read -r bbrPath
echo -e $bbrPath
......@@ -47,6 +85,19 @@ case $choice in
;;
esac
printf "Please enter when you want to generate the validator: "
read -r workspaceDir
if [ ! -d $workspaceDir ]; then
echo "${RED}The provided workspace is not a valid directory"
exit 0
fi
isAbsPath=`echo "${workspaceDir}" | grep ^/.* | wc -l`
if [ $isAbsPath -eq 0 ]; then
echo -e "${RED}[ ${workspaceDir} ] is not an absolute path"
exit 0
fi
_currDate=`date +%Y-%m-%d-%H-%M-%S`
printf "Please enter the folder name of your validator: (output-${validator}-${_currDate})?"
read -r folderName
......@@ -54,8 +105,8 @@ if [ -z $folderName ]; then
folderName="output-${validator}-${_currDate}"
fi;
/bin/bash generateValidator.sh --BBR_LINK=$bbrPath --OUTPUT_FOLDER=$folderName --VALIDATOR_NAME=$validator --IGNORE_TEMPLATEID_REQUIREMENTS="false" --ROOT_CLASS_NAME="net.ihe.gazelle.cdaepsos3.POCDMT000040ClinicalDocument" --HL7TEMP_CDACONFFOLDERNAME="cdaepsos"
echo "your validator will be generated in: ${workspaceDir}/${folderName}"
java -jar $jarPath -bbr $bbrPath -out "${workspaceDir}/${folderName}" -mvn $mavenPath -serviceName $validator -HL7TEMP_CDACONFFOLDERNAME cdaepsos
#/bin/bash generateValidator.sh
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment