File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
code-samples/eventing/bookstore-sample-app/start Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change 1
- #! /bin/bash
1
+ #! /usr/bin/env bash
2
+
3
+ SCRIPT_DIR=$( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd )
2
4
3
5
# Prompt the user to start the installation process
4
6
echo " π Shortcut: This script will install Knative, and deploy the bookstore's frontend and backend on your cluster"
5
7
6
- # Validate that the user is in the correct directory /start
7
- if [ " ${PWD##*/ } " != " start" ]; then
8
- echo " β οΈ Please run this script in the /start directory. Exiting..."
9
- exit
10
- fi
11
- echo " β
You are in the correct directory: /start"
12
8
read -p " π Press ENTER to continue or Ctrl+C to abort..."
13
9
14
10
# Install Knative Serving
@@ -57,8 +53,7 @@ echo "π Installing the Sample Bookstore Frontend"
57
53
read -p " π Press ENTER to continue..."
58
54
59
55
# Install the front end first
60
- cd frontend
61
- kubectl apply -f config
56
+ kubectl apply -f " ${SCRIPT_DIR} /frontend/config"
62
57
63
58
# Wait for the frontend to be ready
64
59
echo " "
@@ -76,8 +71,7 @@ echo ""
76
71
echo " π Installing the Sample Bookstore Backend (node-server)"
77
72
78
73
# Install the node-server
79
- cd ../node-server
80
- kubectl apply -f config/100-deployment.yaml
74
+ kubectl apply -f " ${SCRIPT_DIR} /node-server/config/100-deployment.yaml"
81
75
82
76
# Wait for the backend to be ready
83
77
echo " "
You canβt perform that action at this time.
0 commit comments