From 4aa5ba686e9d532807101ee038902aaf8fbfe952 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 15 Feb 2011 09:16:27 -0800 Subject: [PATCH] c2p updates --- scripts/c2p | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/c2p b/scripts/c2p index d0398edce71..6a64ef127c9 100755 --- a/scripts/c2p +++ b/scripts/c2p @@ -13,11 +13,17 @@ my $git_id; my $header_complete = "false"; my $tmpfile; +$numArgs = $#ARGV + 1; +if ($numArgs != 1) { + print "must provide git id\n"; + exit; +} + $base_id = shift; if ($base_id eq "") { print "must provide git id\n"; - die; + exit; } #print "handing commit id $base_id\n"; @@ -54,10 +60,15 @@ close FILE; #print "$tmpfile\n"; system "vim $tmpfile"; +system "reset"; $new_file = `rename-patch $tmpfile`; chomp($new_file); system "mv $new_file ~/linux/stable/"; -print "moved $new_file to ~/linux/stable/\n" +#print "moved $new_file to ~/linux/stable/\n"; + +system "cd ~/linux/stable && ./apply_it $new_file"; +system "cp ~/linux/stable/$new_file ~/linux/longterm"; +system "cd ~/linux/longterm && ./apply_it $new_file"; #TMPFILE1=`mktemp patch.XXXXXX` || exit 1 #TMPFILE2=`mktemp patch.XXXXXX` || exit 1 -- 2.47.2