forked from adafruit/circuitpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpost_create.sh
More file actions
executable file
·36 lines (30 loc) · 1.45 KB
/
post_create.sh
File metadata and controls
executable file
·36 lines (30 loc) · 1.45 KB
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
#!/bin/bash
# -----------------------------------------------------------------------------
# post_create.sh: postCreateCommand-command writing to $HOME/.bashrc
#
# Author: Bernhard Bablok
#
# -----------------------------------------------------------------------------
echo -e "[post_create.sh] starting postCreateCommand $0\n"
echo -e "[post_create.sh] PWD=$PWD\n"
cat >> $HOME/.bashrc << "EOF"
if [ -f /workspaces/install_build_env.log ]; then
# setup already done
echo "CircuitPython build-environment ready for $CP_TOOLCHAIN/$CP_PORT"
echo "To start a build run:"
echo " cd ports/$CP_PORT"
echo " time make -j $(nproc) BOARD=your_board_name TRANSLATION=de_DE"
elif [ -f /workspaces/install_build_env.log.active ]; then
echo "Initial setup of build environment in progress, please wait."
echo "Use 'tail -f /workspaces/install_build_env.log.active' to monitor progress."
echo "After successful installation, start a new terminal to build CircuitPython."
else
echo "Starting initial setup of build environment, please wait"
nohup /workspaces/circuitpython/.devcontainer/install_build_env.sh >> $HOME/nohup.out &
echo "Use 'tail -f /workspaces/install_build_env.log.active' to monitor progress."
echo "After successful installation, start a new terminal to build CircuitPython."
fi
EOF
touch /workspaces/post_create.finished
# --- that's it! ------------------------------------------------------------
echo -e "[post_create.sh] setup complete\n"