~ubuntu-branches/ubuntu/jaunty/gnupg2/jaunty-security

« back to all changes in this revision

Viewing changes to scripts/mksnapshot

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Viehmann
  • Date: 2008-10-04 10:25:53 UTC
  • mfrom: (5.1.15 intrepid)
  • Revision ID: james.westby@ubuntu.com-20081004102553-fv62pp8dsitxli47
Tags: 2.0.9-3.1
* Non-maintainer upload.
* agent/gpg-agent.c: Deinit the threading library before exec'ing
  the command to run in --daemon mode. And because that still doesn't
  restore the sigprocmask, do that manually. Closes: #499569

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
# Make a snapshot of the CVS head revision
3
 
 
4
 
exec >>/home/koch/mksnapshot.log 2>&1
5
 
 
6
 
echo "Started at `date`."
7
 
set -e
8
 
 
9
 
ftp_dir=$1
10
 
 
11
 
cd $HOME/pub
12
 
PATH="$HOME/bin:$PATH"
13
 
 
14
 
fix_version () {
15
 
    version=$(cat $1/VERSION)
16
 
    echo "$version-snap$(date +%Y-%m-%d)" >$1/VERSION
17
 
    cat <<EOF >$1/SNAPSHOT
18
 
                  WARNING!
19
 
 
20
 
This is a snapshot of the current CVS head branch!
21
 
 
22
 
It may not compile or not work.  Please don't report
23
 
bugs about this snapshot release it is just for your
24
 
convenience and to reduce the load of out CVS server.
25
 
 
26
 
Thanks,
27
 
 
28
 
   Werner
29
 
EOF
30
 
}
31
 
 
32
 
build_dist () {
33
 
    set +e
34
 
    nice scripts/autogen.sh && nice ./configure && nice make dist
35
 
    if ! awk '
36
 
/^diff gnupg-snapshot\/VERSION/  { getline; getline; getline; getline; next }
37
 
/^Common subdirectories:/   { next }
38
 
/~$/    { next }
39
 
{ exit 1 }
40
 
'      ; then
41
 
        # Okay, we have some changes and it is not only the version number
42
 
        rm $ftp_dir/gnupg-*snap*-*-*.tar.gz
43
 
        mv gnupg-*.tar.gz $ftp_dir/
44
 
    fi
45
 
    make distclean
46
 
    set -e
47
 
}
48
 
 
49
 
 
50
 
 
51
 
do_export () {
52
 
    pgm=$1
53
 
    mod=$2
54
 
 
55
 
    rm -rf $pgm.new || true
56
 
    rm -rf $pgm.old || true
57
 
    cvs -Q export -r HEAD -d $pgm.new $mod
58
 
    fix_version $pgm.new
59
 
    if [ -n "$ftp_dir" ]; then
60
 
      here=$(pwd)
61
 
      cd $pgm.new
62
 
      build_dist
63
 
      cd $here
64
 
    fi
65
 
    [ -d $pgm ] && mv $pgm $pgm.old
66
 
    if ! mv $pgm.new $pgm ; then
67
 
        echo "rename failed - restoring" >&2
68
 
        mv $pgm.old $pgm
69
 
        exit 1
70
 
    fi
71
 
    rm -rf $pgm.old || true
72
 
}
73
 
 
74
 
 
75
 
do_export gnupg-snapshot gnupg
76
 
 
77
 
echo "Ended at `date`."
78
 
exit 0
79