]> _ Git - remote-logging.git/commitdiff
Install/build inotifytools
authormivirl <>
Mon, 15 Jan 2024 22:46:25 +0000 (16:46 -0600)
committermivirl <>
Mon, 15 Jan 2024 22:46:25 +0000 (16:46 -0600)
build.sh

index 6dc2b3bb893b98bbc553af0f0ea19e4f1cacfd3b..b5510e2dc34c2c43cf49f2591504643221000cc3 100644 (file)
--- a/build.sh
+++ b/build.sh
@@ -3,11 +3,26 @@
 
 set -eou pipefail
 
+if command -v apt; then
+  sudo apt update || true
+  sudo apt install -y clang || true
+  sudo apt install -y gcc || true
+  sudo apt install -y g++ || true
+  sudo apt install -y make || true
+  sudo apt install -y autoconf || true
+  sudo apt install -y libtool || true
+  sudo apt install -y curl || true
+  sudo apt install -y git || true
+  sudo apt install -y zip || true
+fi
+
 mkdir -p build/output
 cd build/
 
 wget https://busybox.net/downloads/busybox-1.36.1.tar.bz2
 wget https://github.com/DominicBreuker/pspy/releases/download/v1.2.1/pspy64
+wget https://github.com/inotify-tools/inotify-tools/archive/refs/tags/4.23.9.0.tar.gz
+mv 4.23.9.0.tar.gz inotify-tools-4.23.9.0.tar.gz
 wget http://staticperl.schmorp.de/smallperl.bin
 
 sha256sum -c ../checksums
@@ -25,7 +40,21 @@ make
 cd ..
 
 
+# Statically compile inotifywait
+tar -xf inotify-tools-4.23.9.0.tar.gz
+cd inotify-tools-4.23.9.0
+export CC=gcc
+export CXX=g++
+./autogen.sh
+./configure --prefix=/usr --enable-static --disable-shared
+make
+unset CFLAGS
+unset CXXFLAGS
+unset LDFLAGS
+
 
+cd build
 cp busybox-1.36.1/busybox output/
+cp inotify-tools-4.23.9.0/src/inotifywait output/
 cp pspy64 output/
 cp smallperl.bin output/