From 11f43edddffc6e3399bf707063a3c7732d23b623 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Sun, 2 Apr 2023 12:54:02 -0700 Subject: [PATCH] script for on-device development (#126) * symlink /usr/comma/ * remount --------- Co-authored-by: Comma Device --- scripts/setup-on-device.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 scripts/setup-on-device.sh diff --git a/scripts/setup-on-device.sh b/scripts/setup-on-device.sh new file mode 100755 index 0000000..5f2a989 --- /dev/null +++ b/scripts/setup-on-device.sh @@ -0,0 +1,17 @@ +#!/usr/bin/bash +set -e + +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" +ROOT=$DIR/../ + +if [ ! -f /AGNOS ]; then + echo "Exiting, not running AGNOS" + exit 1 +fi + +sudo mount -o rw,remount / + +sudo rm -rf /usr/comma +sudo ln -snf $ROOT/userspace/usr/comma/ /usr/comma + +sudo mount -o ro,remount /