(_IO_new_file_attach): Use __set_errno.
[glibc/history.git] / scripts / list-sources.sh
blob41c8b9eaddb4ece2d908edf89b6b0d6389fffdb9
1 #!/bin/sh
3 # List all the files under version control in the source tree.
6 case $# in
7 0) ;;
8 1) cd "$1" ;;
9 *) echo >&2 "Usage: $0 [top_srcdir]"; exit 2 ;;
10 esac
12 if [ -r CVS/Entries ]; then
14 ${CVS:-cvs} status 2>&1 | ${AWK:-awk} '
15 NF >= 2 && $(NF - 1) == "Examining" { dir = $NF }
16 $1 == "File:" { print (dir == ".") ? $2 : (dir "/" $2) }'
17 exit $?
19 elif [ -r .svn/entries ]; then
21 ${SVN:-svn} ls -R | sed '/\/$/d'
22 exit $?
24 elif [ -r MT/options ]; then
26 exec ${MONOTONE:-monotone} list known
28 elif [ -r .git/HEAD ]; then
30 exec ${GIT:-git} ls-files
34 echo >&2 'Cannot list sources without some version control system in use.'
35 exit 1