diff options
| author | Dawsyn Schraiber <[email protected]> | 2023-11-12 01:06:57 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-11-12 01:06:57 -0500 |
| commit | d695dce1a7ea28433db8e893025d1ec66fb077b2 (patch) | |
| tree | 4089cbc79e9a50b0775ab33e002de03a6f23e77d /bbb_setup.sh | |
| parent | 1b8af4198f7f18ccbfb336709f20a88e26e2b195 (diff) | |
| download | active-drag-system-d695dce1a7ea28433db8e893025d1ec66fb077b2.tar.gz active-drag-system-d695dce1a7ea28433db8e893025d1ec66fb077b2.tar.bz2 active-drag-system-d695dce1a7ea28433db8e893025d1ec66fb077b2.zip | |
Header styles and file naming conventions; CMake ARM Linux musl Compiler
Co-authored-by: Gregory Wainer <[email protected]>
Diffstat (limited to 'bbb_setup.sh')
| -rwxr-xr-x | bbb_setup.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/bbb_setup.sh b/bbb_setup.sh new file mode 100755 index 0000000..42e008d --- /dev/null +++ b/bbb_setup.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +# Change based upon device specifics +IFACE_BB=enp0s20f0u5 +IFACE_SELF=wlan0 +EXE=ads + +echo "Compiling Executeables" +vagrant up +vagrant ssh << EOF + cmake /vagrant; + cmake --build .; + mkdir -p build + cp -r out/* /vagrant/build/ +EOF + +echo "Forwarding Traffic to Beaglebone" +# Forwards all internet traffic requested by beaglebone to proper interface +sudo sh -c "ip link set $IFACE_BB" +sudo sh -c "dhclient $IFACE_BB" + +sudo sh -c "iptables --table nat --append POSTROUTING --out-interface $IFACE_SELF -j MASQUERADE" +sudo sh -c "iptables --append FORWARD --in-interface $IFACE_BB -j ACCEPT" +sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward" + +echo "Copying Executeables to Beaglebone" +scp -r build/* [email protected]:~/; +rm -r build + +echo "Running Main Program" +ssh [email protected] /bin/bash << EOF + ./$EXE; +EOF |
