From 65970101fc7295ef590383f99713a0fb26b67094 Mon Sep 17 00:00:00 2001 From: Joel Jeske Date: Tue, 30 Aug 2022 14:54:00 -0500 Subject: [PATCH] bugfix: gencopy fails if runfile is a real file --- cmd/gencopy/gencopy.bash.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/gencopy/gencopy.bash.in b/cmd/gencopy/gencopy.bash.in index 99b2edb92..7067102f3 100644 --- a/cmd/gencopy/gencopy.bash.in +++ b/cmd/gencopy/gencopy.bash.in @@ -17,10 +17,14 @@ CONFIG_SHORT_PATH=@@CONFIG_SHORT_PATH@@ # either by reading the symbolic link or reading the runfiles manifest. function find_runfile { local runfile=$1 - if [ -f "$runfile" ]; then + if [ -L "$runfile" ]; then readlink "$runfile" return fi + if [ -f "$runfile" ]; then + echo "$runfile" + return + fi runfile=$(echo "$runfile" | sed -e 's!^\(\.\./\|external/\)!!') if grep -q "^$runfile" MANIFEST; then grep "^$runfile" MANIFEST | head -n 1 | cut -d' ' -f2