Skip to content

Commit 156a412

Browse files
committed
Merge remote-tracking branch 'origin/robo/docker-go-script' into robo/integration-39
2 parents 86ab615 + 7162ffc commit 156a412

File tree

2 files changed

+70
-5
lines changed

2 files changed

+70
-5
lines changed

build-linux.sh

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ fi
1010

1111
while [[ "$1" != "" ]]; do
1212
case "$1" in
13-
"--help"|"-h")
14-
echo "$0 <script args> <extra args are passed to cmake>"
15-
popd
16-
exit 0
17-
;;
1813
"--")
1914
# stop parsing args and let cmake take the rest
2015
shift
@@ -37,6 +32,37 @@ while [[ "$1" != "" ]]; do
3732
echo " -DENABLE_TESTING=OFF"
3833
ENABLE_TESTING="OFF"
3934
;;
35+
"-h"|"--help")
36+
cat << EOF
37+
RIP build script for linux
38+
39+
usage: ./build-linux.sh [options] [--] [extra args passed to cmake]
40+
41+
Creates the dir 'build/' / 'build_armhf/'.
42+
Runs Cmake with whatever extra args you gave it.
43+
Attempts a multithreaded build.
44+
Runs a single-threaded build if the multithreaded is unsuccessful.
45+
46+
Overridable Environment Variables:
47+
NO_CD
48+
Set this variable to prevent this script from changing back to the RIP directory.
49+
50+
Options:
51+
--help
52+
Display this message and exit.
53+
-c | --clean
54+
Remove the build folder before starting the build.
55+
-n | --no-cd
56+
Do not CD into this scripts' own directory when building.
57+
(Perform the same build steps on the current directory.)
58+
Used to build robot projects and others which depend on RIP.
59+
-p | --production
60+
Sets the Cmake variable ENABLE_TESTING to 'OFF'
61+
(Default is 'ON')
62+
Add this flag if you are building executables to copy to a Pi.
63+
EOF
64+
exit 0
65+
;;
4066
esac
4167
shift
4268
done

go-docker.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,45 @@ while [[ "$1" != "" ]] ; do
4141
fi
4242
break
4343
;;
44+
'-h'|'--help')
45+
cat << EOF
46+
RIP Docker Script 'go-docker.sh'
47+
48+
Usage: ./go-docker.sh [options] [script args] [program ars ...]
49+
50+
Overridable Environment Variables:
51+
RPXC_IMAGE="utkrobotics/rip_rpi:latest"
52+
See also: --rpxc-tag flag
53+
RPXC_SCRIPT_LOCATION="./docker/rpi/rpxc/rpxc"
54+
Location of the RPXC script used to enter and setup the rip_rpi container from the host.
55+
Location relative to this shell script.
56+
RPXC_SYSROOT="/rpxc/sysroot"
57+
Location of sysroot *inside* the docker container.
58+
Do not change unless using a compatible/different docker image.
59+
RIPPROG
60+
Uses the same values as --prog flag does. (Shown in menu.)
61+
62+
(for building containers...)
63+
RPI_DIST
64+
Sets the raspberry pi distro when building rip_rpi. (i.e. 'jessie'/'stretch')
65+
RPI_DOCKER_TAG
66+
Set the target docker tag for the rip_rpi build.
67+
68+
Options: <required> [optional]
69+
--help
70+
Display this help and exit.
71+
--prog <program selection>
72+
Select a program directly without being prompted by whiptail/dialog.
73+
--rpi [--] [command to run in container]
74+
Run the RPI emulation container directly with an optional command instead of a shell.
75+
--rpxc-tag <tag name>
76+
Specify an alternate tag (different from latest) to use for the docker repo.
77+
Used like 'utkrobotics/rip_rpi:<tag_name>'
78+
-- [anything else]
79+
Ignore flags after the '--' and pass them to the program selection.
80+
EOF
81+
exit 0
82+
;;
4483
*)
4584
echo "Unknown option: $1"
4685
exit 1

0 commit comments

Comments
 (0)