From e675134d088e7594cc1058d3bd3561aefcdb7ff8 Mon Sep 17 00:00:00 2001 From: Kelly Date: Tue, 17 Mar 2026 16:17:15 -0700 Subject: [PATCH] Create bootstrap.sh --- bootstrap.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 bootstrap.sh diff --git a/bootstrap.sh b/bootstrap.sh new file mode 100755 index 0000000..ad1d651 --- /dev/null +++ b/bootstrap.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +set -e +BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +cd "$BASE_DIR" +python3 -m venv "$BASE_DIR/venv" +source "$BASE_DIR/venv/bin/activate" +"$BASE_DIR/venv/bin/pip" install -r "$BASE_DIR/requirements.txt" +cp -r "$BASE_DIR/etc/data/." "$BASE_DIR/data/" +cp "$BASE_DIR/etc/config.template" "$BASE_DIR/config.ini" +replace="s|type = serial|type = tcp|g" +sed -i '' "$replace" "$BASE_DIR/config.ini" +replace="s|# hostname = meshtastic.local|hostname = localhost|g" +sed -i '' "$replace" "$BASE_DIR/config.ini" +deactivate