File: list-sources.sh

package info (click to toggle)
glibc 2.41-11
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 300,376 kB
  • sloc: ansic: 1,050,583; asm: 238,243; makefile: 20,379; python: 13,537; sh: 11,827; cpp: 5,197; awk: 1,795; perl: 317; yacc: 292; pascal: 182; sed: 19
file content (18 lines) | stat: -rwxr-xr-x 307 bytes parent folder | download | duplicates (26)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
#
# List all the files under version control in the source tree.
#

case $# in
0) ;;
1) cd "$1" ;;
*) echo >&2 "Usage: $0 [top_srcdir]"; exit 2 ;;
esac

if [ -r .git/HEAD ]; then
  ${GIT:-git} ls-files
  exit 0
fi

echo >&2 'Cannot list sources without some version control system in use.'
exit 1