/[pkg-java]/trunk/importdiff.sh
ViewVC logotype

Contents of /trunk/importdiff.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 717 - (hide annotations) (download) (as text)
Mon Oct 11 22:16:24 2004 UTC (8 years, 7 months ago) by claviola
File MIME type: application/x-sh
File size: 1685 byte(s)
Reverting to version 1.2; my bad.
1 sgybas 126 #!/bin/sh -e
2    
3     # Copy changed files after building a package to a CVS tree:
4     # 1. changes cvs_base below
5     # 2. build the package
6     # 3. call this script with the .difff.gz as parameter
7     # 4. commit and tag the changes into CVS before uploading!
8     #
9     # Written by Stefan Gybas <sgybas@debian.org>. Released under the GPL!
10    
11     # Base directory of your checked out CVS tree
12 claviola 717 cvs_base=$HOME/debian/cvs
13 sgybas 126
14     ###
15     ### DON'T CHANGE ANYTHING BELOW THIS LINE! (unless you know what you're doing)
16     ###
17    
18     error() {
19     echo $1 >&2
20     exit 1
21     }
22    
23     # Check arguments
24     diff_gz=$1
25     [ -z "${diff_gz}" ] && error "usage: `basename $0` <package.diff.gz>"
26    
27     source_package=`echo ${diff_gz} | cut -d_ -f1`
28     source_version=`echo ${diff_gz} | cut -d_ -f2- | sed -e s/\.diff\.gz//`
29     cvstag_version=`echo ${source_version} | tr . _`
30     upstream_version=`echo ${source_version} | cut -f1 -d\-`
31     extracted_dir=${source_package}-${upstream_version}
32    
33     #echo "DEBUG: source_package = $source_package"
34     #echo "DEBUG: source_version = $source_version"
35     #echo "DEBUG: upstream_version = $upstream_version"
36    
37     # Check .diff.gz, extracted directory and destination directory
38     [ -r "${diff_gz}" ] || error "E: ${diff_gz} is not readable!"
39     [ -r "${extracted_dir}/debian/control" ] || error "E: ${extracted_dir}/debian/control is not readable!"
40     [ -d "${cvs_base}/${source_package}/CVS" ] || error "E: ${cvs_base}/${source_package}/CVS does not exist!"
41    
42 sgybas 130 echo "Copying files:"
43     zgrep "^+++ " $diff_gz | cut -d/ -f2- | xargs tar -C ${extracted_dir} -c | (cd ${cvs_base}/${source_package}; tar -x -v)
44 sgybas 126 echo "Modified Debian files have been copied to ${cvs_base}/${source_package}."
45 sgybas 130 echo "Please tag this release as RELEASE_${cvstag_version} before uploading!"
46 sgybas 126

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.5