aboutsummaryrefslogtreecommitdiff
path: root/compile/fw-ectool.sh
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2026-01-08 00:22:42 -0500
committerMitchell Riedstra <mitch@riedstra.dev>2026-01-08 00:22:42 -0500
commitca7f8bc63d0b5e552280048d1c7002c965366691 (patch)
treefcd5bb1679352e8b24fc6fb68ec8c3fc15064279 /compile/fw-ectool.sh
parenta19b70359cb2425cd7b4a173d116ec5173a277bd (diff)
downloaddotfiles-ca7f8bc63d0b5e552280048d1c7002c965366691.tar.gz
dotfiles-ca7f8bc63d0b5e552280048d1c7002c965366691.tar.xz
Script to build ectool
Diffstat (limited to 'compile/fw-ectool.sh')
-rwxr-xr-xcompile/fw-ectool.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/compile/fw-ectool.sh b/compile/fw-ectool.sh
new file mode 100755
index 0000000..b507359
--- /dev/null
+++ b/compile/fw-ectool.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+# on rhel 9: yum install libusb-devel libftdi-devel
+# Quell the loud fans on the framework 13:
+# sudo $HOME/.local/bin/ectool fanduty 35
+if [ "$(id -u)" -eq 0 ] ; then
+ echo "Run as a regular user"
+ exit 1
+fi
+set -ex
+codedir="${CODEDIR:-$HOME/.local/src}"
+src=https://gitlab.howett.net/DHowett/ectool
+pkgdir="${codedir}/ectool"
+
+if ! [ -d "$pkgdir" ] ; then
+ git clone "$src" "$pkgdir"
+fi
+
+cd "$pkgdir"
+git checkout 0ac6155abbb7d4622d3bcf2cdf026dde2f80dad7
+git reset --hard HEAD
+git clean -fdx .
+mkdir build
+cd -
+cd "$pkgdir/build"
+cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/.local \
+ -Wno-dev
+cmake --build .
+cp src/ectool $HOME/.local/bin/
+cd -
+