File tree Expand file tree Collapse file tree 1 file changed +16
-7
lines changed
workshop/petclinic/scripts Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- # Define the path to the JavaScript file
4- JS_FILE =" /home/splunk/spring-petclinic-microservices/spring-petclinic-api-gateway/src/main/resources/static/scripts/env.js "
3+ # Define the path to the repository directory
4+ REPO_DIR =" /home/splunk/spring-petclinic-microservices"
55
6- # Create the directory if it doesn't exist
7- mkdir -p " $( dirname " $JS_FILE " ) "
6+ # Check if the repository directory exists
7+ if [ -d " $REPO_DIR " ]; then
8+ echo " Repository directory exists."
9+ # Define the path to the JavaScript file
10+ JS_FILE=" $REPO_DIR /spring-petclinic-api-gateway/src/main/resources/static/scripts/env.js"
811
9- # Write the content to the JavaScript file
10- cat << EOF > "$JS_FILE "
12+ # Create the directory if it doesn't exist
13+ mkdir -p " $( dirname " $JS_FILE " ) "
14+
15+ # Write the content to the JavaScript file
16+ cat << EOF > "$JS_FILE "
1117env = {
1218 RUM_REALM: '$RUM_REALM ',
1319 RUM_AUTH: '$RUM_AUTH ',
@@ -16,4 +22,7 @@ env = {
1622}
1723EOF
1824
19- echo " JavaScript file generated at: $JS_FILE "
25+ echo " JavaScript file generated at: $JS_FILE "
26+ else
27+ echo " Error: Repository directory does not exist."
28+ fi
You can’t perform that action at this time.
0 commit comments