~hanno-stock/revu/updated-revu-workflow

« back to all changes in this revision

Viewing changes to scripts/revu-orig

  • Committer: raphink
  • Date: 2006-02-04 05:36:41 UTC
  • Revision ID: ajmitch@augustine-20060204053641-89b1b8639cd91849
 * Added scripts/revu-report
 * Modified scripts/revu-orig to fix some bugs when untaring upstream tarball
 * Modified scripts/revu-build to `touch FTBFS` when FTBFS and add pbuilder-hooks/ scripts to pbuilder
 * Added pbuilder-hooks/ and pbuilder-hooks/B01debuildtest to run `debuild -S -sa` test and report after pbuild

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
# reports comparing it with the orig.tar.gz file. These reports appear on REVU
5
5
# to make the review easier :)
6
6
#
 
7
# Copyright (C) 2006 Raphaël Pinson <raphink@ubuntu.com>
 
8
#
 
9
# This program is free software; you can redistribute it and/or
 
10
# modify it under the terms of the GNU General Public License
 
11
# as published by the Free Software Foundation; either version 2
 
12
# of the License, or (at your option) any later version.
 
13
#
 
14
# This program is distributed in the hope that it will be useful,
 
15
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
17
# GNU General Public License for more details.
 
18
#
 
19
# You should have received a copy of the GNU General Public License
 
20
# along with this program; if not, write to the Free Software
 
21
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
22
 
7
23
 
8
24
TARBALL="$1";
9
25
MD5SUM="/usr/bin/md5sum";
13
29
DIFF="/usr/bin/diff";
14
30
RM="/bin/rm";
15
31
MKDIR="/bin/mkdir";
 
32
ECHO="/bin/echo";
16
33
 
17
34
MD5FILE="tarballs.md5";
18
35
DIFFFILE="tarballs.diff";
30
47
fi
31
48
 
32
49
 
33
 
"$MD5SUM" "$TARBALL" >> "$MD5FILE";
 
50
"$ECHO" "Generating md5 report in $MD5FILE";
 
51
"$MD5SUM" "$TARBALL" > "$MD5FILE";
34
52
"$MD5SUM" *.orig.tar.gz >> "$MD5FILE";
35
53
 
36
54
# create temp dir to extract tarballs
41
59
"$MKDIR" "$TARDIR";
42
60
cd "$TARDIR";
43
61
 
44
 
UPSTREAM=`"$TAR" -xvf ../"$TARBALL" | head -n1 | sed -e 's/\/.*//'`;
 
62
 
 
63
if [[ -n `file "$TARBALL" | grep "tar.bz2"` ]]; then
 
64
         "$ECHO" "Extracting tar.bz2 upstream archive "$TARBALL" to extracted_tarballs/ ...";
 
65
         UPSTREAM_OUTPUT=`"$TAR" xvjf ../"$TARBALL"`;
 
66
         UPSTREAM=`"$ECHO" "$UPSTREAM_OUTPUT" | head -n1 | sed -e 's/\/.*//'`;
 
67
elif [[ -n `file "$TARBALL" | grep "tar.gz"` ]]; then
 
68
         "$ECHO" "Extracting tar.gz upstream archive "$TARBALL" to extracted_tarballs/ ...";
 
69
         UPSTREAM_OUTPUT=`"$TAR" xvzf ../"$TARBALL"`;
 
70
         UPSTREAM=`"$ECHO" "$UPSTREAM_OUTPUT" | head -n1 | sed -e 's/\/.*//'`;
 
71
else
 
72
         "$ECHO" "Unrecognized upstream archive type. Aborting.";
 
73
         exit 1;
 
74
fi
45
75
 
46
76
"$MV" "$UPSTREAM" "$UPSTREAM"-upstream;
47
77
 
48
 
ORIG=`"$TAR" -xvf ../*.orig.tar.gz | head -n1 | sed -e 's/\/.*//'`;
 
78
"$ECHO" "Extracting tar.gz orig archive to extracted_tarballs/ ...";
 
79
ORIG_OUTPUT=`"$TAR" -xvzf ../*.orig.tar.gz`;
 
80
ORIG=`"$ECHO" "$ORIG_OUTPUT" | head -n1 | sed -e 's/\/.*//'`;
49
81
"$MV" "$ORIG" "$ORIG"-orig;
50
82
 
51
 
"$DIFF" -ru ./*-upstream ./*-orig >> ../upstream_orig.diff;
 
83
"$ECHO" "Generating diff report in upstream_orig.diff";
 
84
"$DIFF" -ru ./*-upstream ./*-orig > ../upstream_orig.diff;
52
85
 
53
86
cd ../
54
87