You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/storefront/nginx/15-storefront-extras.sh
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -13,16 +13,16 @@ process_oda() {
13
13
14
14
echo"$ME: Preparing index.html to enable Oracle Digital Assistant"
15
15
storefrontindex="${WWW_DIR}/index.html"
16
-
[ -w$storefrontindex ] &&echo"$ME: Enabling ODA SDK"||echo"$ME: index.html Not Writable. Exiting..."
17
-
sed -i -e 's|<!-- head placeholder 1 -->|<script src="scripts/oda/settings.js"></script>|g'"$storefrontindex"
18
-
sed -i -e 's|<!-- head placeholder 2 -->|<script src="scripts/oda/web-sdk.js" onload="initSdk('$(echo -e "\x27")'Bots'$(echo -e "\x27")')"></script>|g'"$storefrontindex"
16
+
[ -w${WWW_DIR} ] &&echo"$ME: Enabling ODA SDK..."||(echo "$ME: File System Not Writable. Exiting..."&&exit 0)
17
+
sed -i -e 's|<!-- head placeholder 1 -->|<script src="scripts/oda/settings.js"></script>|g'"$storefrontindex"|| (echo "$ME: *** Failed to enable ODA SDK. Exiting..."&&exit 0)
18
+
sed -i -e 's|<!-- head placeholder 2 -->|<script src="scripts/oda/web-sdk.js" onload="initSdk('$(echo -e "\x27")'Bots'$(echo -e "\x27")')"></script>|g'"$storefrontindex"|| (echo "$ME: *** Failed to enable ODA SDK. Exiting..."&&exit 0)
19
19
20
20
echo"$ME: Setting ODA variables"
21
21
odasettingsfile="${ODA_SCRIPTS_DIR}/settings.js"
22
-
[ -w$odasettingsfile ] &&echo"$ME: Running envsubst to update ODA settings.js"||echo"$ME: settings.js Not Writable. Exiting..."
0 commit comments