~ubuntu-branches/ubuntu/oneiric/bugzilla/oneiric

« back to all changes in this revision

Viewing changes to debian/post-checksetup.d/15restoredpkgstatoverride

  • Committer: Bazaar Package Importer
  • Author(s): Raphael Bossek
  • Date: 2009-11-29 13:56:03 UTC
  • mfrom: (9.1.11 sid)
  • Revision ID: james.westby@ubuntu.com-20091129135603-yn5lbfhxxvz8jvjo
Tags: 3.2.5.1-2
Fixed dash compatibility within ../bugzilla3/lib/checksetup.pl.
Closes: #558238

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# Copyright (C) 2009  Raphael Bossek <bossekr@debian.org>
 
3
 
 
4
set -e
 
5
 
 
6
tmpf=`tempfile`
 
7
trap "rm $tmpf" EXIT QUIT
 
8
dpkg-statoverride --list "*/bugzilla3*"| sed -e 's,^\([^[:space:]]\+\)[[:space:]]\([^[:space:]]\+\)[[:space:]]\([^[:space:]]\+\)[[:space:]]\(.*\),chown \1:\2 "\4"\nchmod \3 "\4",g' >"$tmpf"
 
9
set +e
 
10
. "$tmpf"
 
11
set -e
 
12
 
 
13
# Please read the post-checksetup.d/10setdefaultdpkgstatoverride about how
 
14
# to speed up the processing of "$BUGZILLA_VARDIR"/templates
 
15
for d in `find "$BUGZILLA_VARDIR"/template -mindepth 1 -type d`; do
 
16
        chmod --reference="$BUGZILLA_VARDIR"/template "$d"
 
17
        chown --reference="$BUGZILLA_VARDIR"/template "$d"
 
18
done
 
19
for f in `find "$BUGZILLA_VARDIR"/template -mindepth 1 -type f`; do
 
20
        test "$f" = "$BUGZILLA_VARDIR"/template/en/default/index.html.tmpl && continue
 
21
        chmod --reference="$BUGZILLA_VARDIR"/template/en/default/index.html.tmpl "$f"
 
22
        chown --reference="$BUGZILLA_VARDIR"/template/en/default/index.html.tmpl "$f"
 
23
done
 
24
# Access rights for the $BUGZILLA_DATADIR/template content are the same as
 
25
# for the source files.
 
26
for d in `find $BUGZILLA_DATADIR/template -mindepth 1 -type d`; do
 
27
        chmod --reference="$BUGZILLA_VARDIR"/template "$d"
 
28
        chown --reference="$BUGZILLA_VARDIR"/template "$d"
 
29
done
 
30
for f in `find $BUGZILLA_DATADIR/template -mindepth 1 -type f`; do
 
31
        chmod --reference="$BUGZILLA_VARDIR"/template/en/default/index.html.tmpl "$f"
 
32
        chown --reference="$BUGZILLA_VARDIR"/template/en/default/index.html.tmpl "$f"
 
33
done