Organizes 11 projects for Cerbo GX/Venus OS into a single repository: - axiom-nmea: Raymarine LightHouse protocol decoder - dbus-generator-ramp: Generator current ramp controller - dbus-lightning: Blitzortung lightning monitor - dbus-meteoblue-forecast: Meteoblue weather forecast - dbus-no-foreign-land: noforeignland.com tracking - dbus-tides: Tide prediction from depth + harmonics - dbus-vrm-history: VRM cloud history proxy - dbus-windy-station: Windy.com weather upload - mfd-custom-app: MFD app deployment package - venus-html5-app: Custom Victron HTML5 app fork - watermaker: Watermaker PLC control UI Adds root README, .gitignore, project template, and per-project .gitignore files. Sensitive config files excluded via .gitignore with .example templates provided. Made-with: Cursor
52 lines
1.2 KiB
Bash
Executable File
52 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ -z "$1" ]; then
|
|
echo "Host not set. Usage: $0 <host ip>"
|
|
exit 1
|
|
fi
|
|
|
|
BUILD=false
|
|
PORT=22
|
|
POSITIONAL=()
|
|
while [[ $# -gt 0 ]]; do
|
|
key="$1"
|
|
|
|
case $key in
|
|
-u|--username)
|
|
USERNAME="$2"
|
|
shift # past argument
|
|
shift # past value
|
|
;;
|
|
-b|--build)
|
|
BUILD=true
|
|
shift # past argument
|
|
;;
|
|
-p|--port)
|
|
PORT="$2"
|
|
shift # past argument
|
|
shift # past value
|
|
;;
|
|
*) # unknown option
|
|
POSITIONAL+=("$1") # save it in an array for later
|
|
shift # past argument
|
|
;;
|
|
esac
|
|
done
|
|
set -- "${POSITIONAL[@]}" # restore positional parameters
|
|
|
|
USERNAME=${USERNAME:-root}
|
|
HOST="$1"
|
|
|
|
if $BUILD; then
|
|
echo "Building app.."
|
|
npm run build
|
|
fi
|
|
|
|
echo "Uploading dist/* to ${USERNAME}@${HOST}:/data/www/app/"
|
|
|
|
echo "mkdir -p /data/www/app/"
|
|
ssh -p "${PORT}" -oStrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "${USERNAME}"@"${HOST}" \
|
|
"[ -d /data/www/app/ ] || mkdir -p /data/www/app/"
|
|
|
|
rsync --delete --info=progress2 -e "ssh -p ${PORT} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" -r dist/* "${USERNAME}"@"${HOST}":/data/www/app/
|