From 87d14d029ffcf90065c56747854b475d9beba187 Mon Sep 17 00:00:00 2001 From: jp30 Date: Wed, 27 Jul 2005 07:10:02 +0000 Subject: [PATCH] upload-unslung-modules target --- Makefile | 9 +++++++++ scripts/.mtn2git_empty | 0 scripts/package-strip.pl | 28 ++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 scripts/.mtn2git_empty create mode 100755 scripts/package-strip.pl diff --git a/Makefile b/Makefile index a73f331afd..33e686c0fe 100644 --- a/Makefile +++ b/Makefile @@ -189,6 +189,15 @@ publish-master: push-master upload-openslug-cross: openslug/Makefile rsync -avr openslug/tmp/deploy/ipk/ unslung@nslu.sf.net:nslu/feeds/openslug/unstable/ +.PHONY: upload-unslung-modules +upload-unslung-modules: unslung/Makefile + scripts/package-strip.pl kernel-module-\* unslung/tmp/deploy/ipk/Packages unslung/tmp/deploy/ipk/Packages.new + mv unslung/tmp/deploy/ipk/Packages.new unslung/tmp/deploy/ipk/Packages + rm -f unslung/tmp/deploy/ipk/Packages.gz + gzip -c unslung/tmp/deploy/ipk/Packages >unslung/tmp/deploy/ipk/Packages.gz + rsync -avr unslung/tmp/deploy/ipk/kernel-module-* unslung@nslu.sf.net:nslu/feeds/unslung/oe/ + rsync -avr unslung/tmp/deploy/ipk/Packages* unslung@nslu.sf.net:nslu/feeds/unslung/oe/ + .PHONY: import-openembedded import-openembedded: openembedded/conf/machine/nslu2.conf monotone pull monotone.vanille.de org.openembedded.* diff --git a/scripts/.mtn2git_empty b/scripts/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/scripts/package-strip.pl b/scripts/package-strip.pl new file mode 100755 index 0000000000..45c64134f8 --- /dev/null +++ b/scripts/package-strip.pl @@ -0,0 +1,28 @@ +#!/usr/bin/perl + +my $pat = shift(@ARGV) || usage(1); +my $infile = shift(@ARGV) || usage(1); +my $outfile = shift(@ARGV) || "-"; +print STDERR "Package-strip processing input file $infile\n"; +print STDERR "Output to " . ($outfile ne "-" ? $outfile : "stdout") . "\n"; + +# massage the regexp to accept semi-shell-style * +$pat =~ s/\*/.*/g; + +open (I,"<$infile") || die $@; +open (O,">>$outfile") || die $@; +undef $/; +my $srctext = ; +close(I); + +my @srclist = split(/\012\012\012/,$srctext); +my @outlist = grep(/Package: $pat/,@srclist); +print O join("\012\012\012",@outlist); +print O "\012\012\012"; + +sub usage { + my $cack = shift(@_); + print STDERR "usage: Package-strip [output filename]\nRemember to escape wildcard characters for the shell."; + die if $cack; +} + -- 2.39.5