-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevspace_start.sh
executable file
·40 lines (34 loc) · 1.5 KB
/
devspace_start.sh
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
#!/bin/bash
set +e # Continue on errors
COLOR_CYAN="\033[0;36m"
COLOR_RESET="\033[0m"
if [ ! -f "/vcluster/syncer" ]; then
echo "Downloading vCluster syncer..."
mkdir -p /vcluster
curl -L -o /vcluster/syncer "https://github.com/loft-sh/vcluster/releases/download/v0.23.0/syncer-linux-$(go env GOARCH)"
curl -L -o /usr/local/bin/kine "https://github.com/k3s-io/kine/releases/download/v0.13.8/kine-$(go env GOARCH)"
chmod +x /vcluster/syncer
chmod +x /usr/local/bin/kine
echo "Successfully downloaded syncer"
fi
#RUN_CMD="go build -mod vendor -o plugin main.go && /go/bin/dlv --listen=:40000 --headless=true --api-version=2 --accept-multiclient exec /vcluster/syncer start"
RUN_CMD="go build -mod vendor -o plugin main.go && /vcluster/syncer start"
echo -e "${COLOR_CYAN}
____ ____
| _ \ _____ __/ ___| _ __ __ _ ___ ___
| | | |/ _ \ \ / /\___ \| '_ \ / _\` |/ __/ _ \\
| |_| | __/\ V / ___) | |_) | (_| | (_| __/
|____/ \___| \_/ |____/| .__/ \__,_|\___\___|
|_|
${COLOR_RESET}
Welcome to your development container!
This is how you can work with it:
- Run \`${COLOR_CYAN}${RUN_CMD}${COLOR_RESET}\` to start the plugin
- ${COLOR_CYAN}Files will be synchronized${COLOR_RESET} between your local machine and this container
${COLOR_CYAN}TIP:${COLOR_RESET} hit an up arrow on your keyboard to find the commands mentioned above :)
"
# add useful commands to the history for convenience
export HISTFILE=/tmp/.bash_history
history -s $RUN_CMD
history -a
bash