Skip to content

Commit

Permalink
added script to run commands in a temp docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
danielk-98 committed May 24, 2022
1 parent c34c3f7 commit b5ca2e6
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 4 deletions.
12 changes: 12 additions & 0 deletions OSEK_C_Project_Template/runcmd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
PROJECT_LOCAL_PATH=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
PROJECT_NAME="$(basename "$PROJECT_LOCAL_PATH")"

docker run --rm \
--interactive \
--tty \
--privileged \
--mount type=bind,source="$PROJECT_LOCAL_PATH",target="/home/nxtosek/projects/$PROJECT_NAME" \
--workdir "/home/nxtosek/projects/$PROJECT_NAME" \
nxtosek:latest \
"$@"
6 changes: 5 additions & 1 deletion nxtosek/ecrobot/ecrobot++.mak
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,11 @@ endif
@echo "Removing map files"
@rm -f *.map
@echo "Removing upload scripts"
@rm -f *.sh
@rm -f ./$(BIOSFLASH)
@rm -f ./$(APPFLASH)
@rm -f ./$(RAMBOOT)
@rm -f ./$(RXEFLASH)
@rm -f ./$(RXEFWFLASH)

ifneq "$(MAKECMDGOALS)" "clean"
-include $(dependencies)
Expand Down
6 changes: 5 additions & 1 deletion nxtosek/ecrobot/ecrobot.mak
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,11 @@ endif
@echo "Removing map files"
@rm -f *.map
@echo "Removing upload scripts"
@rm -f *.sh
@rm -f ./$(BIOSFLASH)
@rm -f ./$(APPFLASH)
@rm -f ./$(RAMBOOT)
@rm -f ./$(RXEFLASH)
@rm -f ./$(RXEFWFLASH)

ifneq "$(MAKECMDGOALS)" "clean"
-include $(dependencies)
Expand Down
2 changes: 1 addition & 1 deletion nxtosek/ecrobot/scripts/flash-bios-firmware.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ echo "Usage: flash-bios-firmware.sh [COM]
- COM is either 'usb' (default) or another valid nexttool alias
"

FIRMWARE="$NXTOSEK/firmware/nxt_bios_rom_3.00.rfw"
FIRMWARE="$NXTOSEK/firmware/nxt_bios_rom_1.04.rfw"
if (( $# == 0 )); then
COM=usb
elif (( $# == 1 )); then
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion scripts/build_nxt_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ VERSION=$(cat "$PROJECT_ROOT/VERSION")
WSL=$(if grep -q microsoft /proc/version; then echo 'true'; else echo 'false'; fi)
INSTALL_DIR="/usr/local/bin"

sudo apt-get install --no-install-recommends gcc g++ build-essential fpc libusb-0.1-4 libusb-dev scons python
sudo apt-get install --no-install-recommends git subversion gcc g++ build-essential fpc libusb-0.1-4 libusb-dev scons python

# Download BricxCC, build NeXTTool, install
mkdir -p "/tmp/bricxcc"
Expand Down

0 comments on commit b5ca2e6

Please sign in to comment.