Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
#Colors definitions for terminal
RED='\033[0;31m'
GREEN='\033[0;32m'
ORANGE='\033[0;33m'
NC='\033[0m'
printf "Please enter a path to your BBR (Absolute Path) : "
read -r bbrPath
echo -e $bbrPath
isAbsPath=`echo "${bbrPath}" | grep ^/.* | wc -l`
if [ $isAbsPath -eq 0 ]; then
echo -e "${RED}[ ${bbrPath} ] is not an absolute path"
exit 0
fi
if [ ! -f $bbrPath ]; then
echo -e "${RED}[ ${bbrPath} ] is not a file or doesn't exist !"
exit 0
fi
printf "Please choose the kind of validator you want to generate: \n"
printf "\t 1- Pivot (L3)\n"
printf "\t 2- Scanned (L1)\n"
printf "\t 3- Friendly\n"
printf "your choice: "
read -r choice
if [ $choice -gt 3 -o $choice -lt 1 ]; then
echo "Wrong choice, please repeat and choose between 1 and 3"
exit 0
fi
case $choice in
1)
echo "generating pivot"
validator="pivot"
;;
2)
echo "generation scanned"
validator="scanned"
;;
3)
echo "generation friendly"
validator="friendly"
;;
esac
_currDate=`date +%Y-%m-%d-%H-%M-%S`
printf "Please enter the folder name of your validator: (output-${validator}-${_currDate})?"
read -r folderName
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"
#/bin/bash generateValidator.sh