summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-01-11 10:55:07 +1100
committerAndrew Tridgell <tridge@samba.org>2011-01-11 01:23:05 +0100
commit20418ccc1461404d69646e9c39c1c86ed88044ce (patch)
treecefb584fc9c0a5db7dc472a53f78f624671f4975 /script
parentaf91d318606b609e08c25ac5eaf420d4b236d6c2 (diff)
downloadsamba-20418ccc1461404d69646e9c39c1c86ed88044ce.tar.gz
samba-20418ccc1461404d69646e9c39c1c86ed88044ce.tar.bz2
samba-20418ccc1461404d69646e9c39c1c86ed88044ce.zip
script: added librelease.sh script
this is used to make library releases
Diffstat (limited to 'script')
-rwxr-xr-xscript/librelease.sh68
1 files changed, 68 insertions, 0 deletions
diff --git a/script/librelease.sh b/script/librelease.sh
new file mode 100755
index 0000000000..105e794c69
--- /dev/null
+++ b/script/librelease.sh
@@ -0,0 +1,68 @@
+#!/bin/bash
+# make a release of a Samba library
+
+if [ ! -d ".git" ]; then
+ echo "Run this script from the top-level directory in the"
+ echo "repository"
+ exit 1
+fi
+
+if [ $# -lt 1 ]; then
+ echo "Usage: librelease.sh <LIBNAMES>"
+ exit 1
+fi
+
+
+release_lib() {
+ lib="$1"
+ srcdir="$2"
+
+ pushd $srcdir
+
+ echo "Releasing library $lib"
+
+ echo "building release tarball"
+ tgzname=$(make dist 2>&1 | grep ^Created | cut -d' ' -f2)
+ [ -f "$tgzname" ] || {
+ echo "Failed to create tarball"
+ exit 1
+ }
+ tarname=$(basename $tgzname .gz)
+ echo "Tarball: $tarname"
+ gunzip $tgzname || exit 1
+ [ -f "$tarname" ] || {
+ echo "Failed to decompress tarball $tarname"
+ exit 1
+ }
+ echo "signing"
+ gpg --detach-sign --armor $tarname || exit 1
+ [ -f "$tarname.asc" ] || {
+ echo "Failed to create signature $tarname.asc"
+ exit 1
+ }
+ echo "compressing"
+ gzip -9 $tarname
+ [ -f "$tgzname" ] || {
+ echo "Failed to compress $tgzname"
+ exit 1
+ }
+
+ echo "Transferring"
+ rsync -Pav $tarname.asc $tgzname master.samba.org:~ftp/pub/$lib/
+
+ popd
+}
+
+for lib in $*; do
+ case $lib in
+ talloc | tdb | tevent)
+ release_lib $lib "lib/$lib"
+ ;;
+ ldb)
+ release_lib $lib "source4/lib/$lib"
+ ;;
+ *)
+ echo "Unknown library $lib"
+ exit 1
+ esac
+done