On 2/3/22 22:51, Jakub Jelinek wrote:
On Thu, Feb 03, 2022 at 04:29:39PM -0500, Marek Polacek wrote:
On Thu, Feb 03, 2022 at 10:13:36PM +0100, Martin Liška wrote:
On 2/3/22 19:44, Andreas Schwab wrote:
On Feb 03 2022, Martin Liška wrote:
+cd $LIB
+echo "$all_dirs" | xargs mkdir -p
+cd ..
+
$LIB always contains slashes.
And what is the problem? You're too brief..
I guess his point is that if you do
cd a/b/c/
then
cd ..
will not get you back to where you started. Perhaps you could use
pushd/popd instead.
Or a subshell.
Jakub
I'm suggesting the following patch.
Ready to be installed?
Thanks,
Martin
From 77bc388daf42d18334cb874407031fc49dbbaa67 Mon Sep 17 00:00:00 2001
From: Martin Liska <mli...@suse.cz>
Date: Fri, 4 Feb 2022 10:24:51 +0100
Subject: [PATCH] fixincludes: Update pwd.
fixincludes/ChangeLog:
* fixinc.in: Use cd OLDDIR instead of cd .. .
---
fixincludes/fixinc.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fixincludes/fixinc.in b/fixincludes/fixinc.in
index 0c3066452c6..0bd8027a554 100755
--- a/fixincludes/fixinc.in
+++ b/fixincludes/fixinc.in
@@ -258,9 +258,10 @@ then echo "All directories (including links to directories):"
echo $all_dirs
fi
+OLDDIR=`${PWDCMD}`
cd $LIB
echo "$all_dirs" | xargs mkdir -p
-cd ..
+cd ${OLDDIR}
mkdir $LIB/root
--
2.35.1