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