mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-09 19:02:18 +00:00
Estimated hours taken: 1 Branches: main A new, more accurate version of cvdd. tools/cvsfiles: Cvsfiles is a new script. It takes a directory name as its argument, and outputs the ordinary files in that directory under CVS control. tools/cvsdirs: Cvsdirs is a new script. It takes a directory name as its argument, and outputs the subdirectories in that directory under CVS control. tools/cvdd: This new version of cvdd uses cvsfiles and cvsdirs, instead of guesses based on the directory name, to decide what files to compare in each subdirectory of the two workspaces being compared. It also allows one to record, in files named NEWFILES and NEWDIRS, new files and/or directories one has added that have not yet been put under CVS control (for use when disconnected).
23 lines
317 B
Bash
Executable File
23 lines
317 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if test $# = 0
|
|
then
|
|
prefix=""
|
|
elif test $# = 1 -a -d $1
|
|
then
|
|
prefix="$1/"
|
|
else
|
|
echo "usage: cvsfiles [dirname]"
|
|
exit 1
|
|
fi
|
|
|
|
tmpfile=/tmp/cvsfiles$$
|
|
trap "/bin/rm -f $tmpfile" 0 1 2 3 15
|
|
cat > $tmpfile << 'EOF'
|
|
BEGIN { FS = "/"; }
|
|
/^\// {
|
|
printf "%s\n", $2;
|
|
}
|
|
EOF
|
|
awk -f $tmpfile ${prefix}CVS/Entries
|