Files
ZIFI32--ESP32-/src/bump_feat.sh
T
alexandClaude Sonnet 5 6d835bc44c Initial import: ESP32 ZiFi32 firmware with SMB2/3 VFS bridge
Based on https://github.com/tslabs/zx-evo/tree/master/pentevo/esp32,
extended with an SMB2/3 server that exposes the ZX Evolution's real SD
card as a network share (browse/download/upload/delete), plus assorted
stability and protocol-correctness fixes in vfs_bridge.cpp and the
vendored libsmb2 - see firmware/README.md for the detailed changelog
and current status.

Also adds:
- firmware/: ready-to-flash compiled binaries + flashing instructions
- hardware/: adapter board connection diagram, PCB photo, and Gerber
  files
- src/third_party/libsmb2: vendored from sahlberg/libsmb2 (LGPL-2.1,
  see its own COPYING/LICENCE files), de-submoduled to a plain
  snapshot with local patches applied directly

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-14 16:00:05 +03:00

29 lines
669 B
Bash

#!/bin/sh
set -eu
SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
HDR="${1:-$SCRIPT_DIR/../src/esp_spi_defs.h}"
if [ ! -f "$HDR" ]; then
echo "bump-feat: file not found: $HDR" >&2
exit 1
fi
old="$(sed -nE 's/^[[:space:]]*#define[[:space:]]+FEAT_VER[[:space:]]+([0-9]+).*/\1/p' "$HDR" | head -n1)"
if [ -z "$old" ]; then
echo "bump-feat: FEAT_VER not found in $HDR" >&2
exit 1
fi
if [ "$old" -ge 65535 ]; then
echo "bump-feat: FEAT_VER is 2 bytes and already at maximum 65535" >&2
exit 1
fi
new=$((old + 1))
sed -i -E "s/^([[:space:]]*#define[[:space:]]+FEAT_VER[[:space:]]+)[0-9]+/\1${new}/" "$HDR"
echo "bump-feat: FEAT ${old} -> ${new}"