File 0001-absdirs-Prefer-using-grep-instead-of-ag.patch of Package icmake
From 0f9d8cd4a6b1724b0d813d5cdc7e1a4b15db9754 Mon Sep 17 00:00:00 2001
From: val4oss <val4oss@pm.me>
Date: Mon, 27 Oct 2025 11:17:58 +0100
Subject: [PATCH] absdirs: Prefer using grep instead of ag
* Some linux distribution doesn't provide ag command, would be better to
use a more generic command like grep.
Signed-off-by: val4oss <val4oss@pm.me>
---
icmake/scripts/absdirs | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/icmake/scripts/absdirs b/icmake/scripts/absdirs
index 1cb8c843..8c186579 100644
--- a/icmake/scripts/absdirs
+++ b/icmake/scripts/absdirs
@@ -1,11 +1,9 @@
ok=1
-
for dir in BINDIR SKELDIR MANDIR LIBDIR CONFDIR DOCDIR ; do
- ag "#define\s+${dir}\s+\"/" INSTALL.im > /dev/null
- if [ $? -eq 0 ] ; then
- line=`ag --nofilename "#define\s+${dir}" INSTALL.im`
+ if grep -q "^#define[[:space:]]*${dir}[[:space:]]*\"/" INSTALL.im; then
+ line=`grep "^#define[[:space:]]*${dir}[[:space:]]*\"/" INSTALL.im`
echo $line >> tmp/INSTALL.im
linesh=`echo $line | sed 's/^.*#define\s\+'${dir}'\s\+/'${dir}'=/'`
echo $linesh >> tmp/INSTALL.sh
@@ -18,5 +16,3 @@ done
[ $ok -eq 1 ] || exit 1
echo OK
-
-
--
2.51.0