Something went wrong. Try again.
Opensource firmware for NRF52840 Pro Micro that copycats the Steam Controller 2 Puck and adds an Xbox and Switch mode
Something went wrong. Try again.
123456789101112131415161718192021#!/bin/sh# gen_version.sh -- write OpenPuck/git_version.h with the current git short hash + dirty flag, for the build# provenance shown in the WebUSB panel. Run this BEFORE `arduino-cli compile` (it's a no-op to re-run). The# generated header is git-ignored, so generating it never itself marks the tree dirty.set -ecd "$(dirname "$0")"
HASH=$(git rev-parse --short=8 HEAD 2>/dev/null || echo unknown)# Dirty = any tracked change OR untracked file (porcelain is empty only on a clean tree). git_version.h is# git-ignored so it doesn't count.if [ -z "$(git status --porcelain 2>/dev/null)" ]; then DIRTY=0; else DIRTY=1; fi
cat > OpenPuck/git_version.h <<EOF// AUTO-GENERATED by gen_version.sh -- do not edit, do not commit (git-ignored).#pragma once#define OPK_GIT_HASH "$HASH"#define OPK_GIT_DIRTY $DIRTYEOF
echo "OpenPuck/git_version.h: hash=$HASH dirty=$DIRTY"