Initial commit. Working.

This commit is contained in:
James Bateman (hp-laptop)
2026-09-29 10:08:05 +01:00
commit 8e9d1e294c
10 changed files with 585 additions and 0 deletions
Executable
+32
View File
@@ -0,0 +1,32 @@
#!/usr/bin/env bash
#
# uninstall.sh — reverse install.sh. Removes the FlyCapture2 core libraries,
# the CLI tools, the udev rule and the example source. Leaves the '$GROUP'
# group, the GRUB USBFS setting and the apt dependencies in place (harmless,
# and other things may rely on them); comments below show how to undo those.
#
set -euo pipefail
UDEV_RULES="/etc/udev/rules.d/40-flir.rules"
[ "$(id -u)" -eq 0 ] || { echo "Run as root: sudo ./uninstall.sh" >&2; exit 1; }
echo "==> Removing FlyCapture2 packages"
dpkg -r libflycapture-c2-dev libflycapture-c2 libflycapture2-dev libflycapture2 2>/dev/null || true
echo "==> Removing CLI tools, viewer and example source"
rm -f /usr/local/bin/FlyCapture2Test /usr/local/bin/FlyCapture2Test_C /usr/local/bin/fc2view
rm -rf /usr/src/flycapture
echo "==> Removing udev rule"
rm -f "$UDEV_RULES"
udevadm control --reload-rules && udevadm trigger
cat <<'EOF'
Done. Not removed (undo manually if you want to):
* group 'flirimaging' -> sudo groupdelete flirimaging
* USBFS kernel arg -> edit /etc/default/grub, remove
'usbcore.usbfs_memory_mb=1000', then
sudo update-grub
EOF