about summary refs log tree commit diff
path: root/scripts/list-sources.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/list-sources.sh')
-rwxr-xr-xscripts/list-sources.sh17
1 files changed, 15 insertions, 2 deletions
diff --git a/scripts/list-sources.sh b/scripts/list-sources.sh
index 53b6f7f0ee..528e971b42 100755
--- a/scripts/list-sources.sh
+++ b/scripts/list-sources.sh
@@ -11,8 +11,21 @@ esac
 
 if [ -r .git/HEAD ]; then
 
-  exec ${GIT:-git} ls-files
-
+  # List files for glibc core.
+  ${GIT:-git} ls-files
+  # List files for glibc ports.
+  ports="ports"
+  if [ -d "$PWD/$ports" ]; then
+    cd "$PWD/$ports"
+    ${GIT:-git} ls-files | sed -e "s,^,$ports/,g"
+  else
+    # We expect the glibc-ports directory to be symlinked as PORTS.
+    # The glibc release manager will run this script as part of libc.pot
+    # regeneration and should ensure the symlink to PORTS is setup.
+    echo >&2 "WARNING: No \"$ports\" directory found. Expected glibc-ports"\
+	     "source directory to be symlinked as \"$ports\" directory."
+  fi
+  exit 0
 fi
 
 echo >&2 'Cannot list sources without some version control system in use.'