git-gui: don't delete source files when auto_mkindex fails
Commit 2cc5b0facfa4 (git-gui: extract script to generate "tclIndex", 2025-03-11) converted commands in a Makefile rule to a shell script. In this process, the Makefile variable $@ had to be replaced by the file name that it represents, 'lib/tclIndex'. However, the occurrence in `rm -f $@` was missed. In a shell script, $@ expands to all command line arguments, which happen to be the source files lib/*.tcl in this case. Needless to say that we do not want to remove source files during a build. Replace $@ by the intended 'lib/tclIndex'. Reported-by: Randall S. Becker <rsbecker@nexbridge.com> Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Johannes Sixt committed
Jun 6, 2025 at 07:41 UTC
765f1db2b5a890c0fa01f8976f197a8483357afe
1 file changed
+1
-1
generate-tclindex.sh
+1
-1
@@ -23,7 +23,7 @@ then
23
: ok
24
else
25
echo >&2 " * $TCL_PATH failed; using unoptimized loading"
26
- rm -f $@
26
+ rm -f lib/tclIndex
27
echo '# Autogenerated by git-gui Makefile' >lib/tclIndex
28
echo >>lib/tclIndex
29
echo "class.tcl" >>lib/tclIndex