find_cvs_not_up_to_date
This commit is contained in:
parent
878496aeee
commit
6f278ae0cb
|
@ -0,0 +1,38 @@
|
|||
include GNUmakevars
|
||||
|
||||
CONFDIR=../../configure
|
||||
CONFDIR_exists=$(shell [ -d $(CONFDIR) ] && echo ok)
|
||||
|
||||
all: configure find_cvs_not_up_to_date
|
||||
|
||||
clean:
|
||||
rm -f find_cvs_not_up_to_date customize
|
||||
|
||||
distclean: clean
|
||||
|
||||
|
||||
install: $(BINDIR) $(BINDIR)/find_cvs_not_up_to_date
|
||||
|
||||
%: %.pl customize
|
||||
sh ./customize < $< > $@
|
||||
chmod +x $@
|
||||
|
||||
%: %.sh customize
|
||||
sh ./customize < $< > $@
|
||||
chmod +x $@
|
||||
|
||||
customize: configure
|
||||
sh ./configure
|
||||
|
||||
ifeq ($(CONFDIR_exists),ok)
|
||||
|
||||
configure: $(CONFDIR)/start $(CONFDIR)/perl $(CONFDIR)/finish
|
||||
cat $^ > $@
|
||||
|
||||
endif
|
||||
|
||||
$(BINDIR):
|
||||
mkdir -p $@
|
||||
|
||||
include GNUmakerules
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
echo "#!/bin/sh" > customize.$$
|
||||
echo "sed \\" > customize.$$
|
||||
chmod +x customize.$$
|
||||
|
||||
################################################################
|
||||
# find a working perl:
|
||||
#
|
||||
for i in /usr/bin/perl /usr/local/bin/perl /usr/bin/perl5 /usr/local/bin/perl5
|
||||
do
|
||||
if $i -e 'exit ($] < 5.000)'
|
||||
then
|
||||
echo $i works
|
||||
perl="$i"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ -z "$perl" ]
|
||||
then
|
||||
could not find a working perl command, sorry.
|
||||
exit 1
|
||||
fi
|
||||
echo " -e 's,@@@perl@@@,$perl,g' \\" >> customize.$$
|
||||
|
||||
|
||||
################################################################
|
||||
# finish
|
||||
# Add trailing newline and rename temp file to final name
|
||||
#
|
||||
echo >> customize.$$
|
||||
|
||||
mv customize.$$ customize
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
#!@@@perl@@@ -w
|
||||
use strict;
|
||||
use File::Find;
|
||||
use Getopt::Long;
|
||||
|
||||
my $debug = 0;
|
||||
|
||||
sub check_cvs {
|
||||
local $/ =
|
||||
"===================================================================\n";
|
||||
return unless (-d "$_/CVS");
|
||||
print STDERR "checking $File::Find::dir/$_\n" if ($debug);
|
||||
|
||||
# $_ is a CVS working dir
|
||||
|
||||
open (CVSSTATUS, "cd $_ && cvs -q status|");
|
||||
while(<CVSSTATUS>) {
|
||||
print if (/Status/ && !/Status: Up-to-date/);
|
||||
}
|
||||
close(CVSSTATUS);
|
||||
|
||||
# don't recurse, cvs already did:
|
||||
$File::Find::prune = 1;
|
||||
}
|
||||
|
||||
GetOptions("debug" => \$debug);
|
||||
@ARGV = (".") unless (@ARGV);
|
||||
find(\&check_cvs, @ARGV);
|
Loading…
Reference in New Issue