blob: b5073596a9a30489604ac3791b9d468cc908729a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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 -
|