#!/bin/sh
#
# release.sh: script to roll a release tarball of darkstat.
-# copyright (c) 2006-2009 Emil Mikulic.
+# copyright (c) 2006-2011 Emil Mikulic.
#
# This is for developer use only and lives in the repo but
# shouldn't end up in a tarball.
#
-# Remember to run "./test_headers.sh"
-# Remember to run "make depend" to update deps in Makefile.in
-#
-
if [ $# -ne 1 ]; then
echo "usage: $0 3.0.0rc0" >&2
exit 1
acct.h \
addr.c \
addr.h \
+bsd.c \
+bsd.h \
cap.c \
cap.h \
+cdefs.h \
contrib \
conv.c \
conv.h \
darkstat.8.in \
darkstat.c \
-darkstat.h \
daylog.c \
daylog.h \
db.c \
localip.h \
ncache.c \
ncache.h \
+now.c \
now.h \
opt.h \
pidfile.c \
echo ==\> "$@" >&2
}
-PKG=$NAME-$VERSION
-say releasing $PKG
-
run() {
say "$@"
"$@" || { say ERROR!; exit 1; }
}
+PKG=$NAME-$VERSION
+say releasing $PKG
+run make depend
+run make graphjs.h stylecss.h
+run autoconf
+run autoheader
+run ./config.status
+run ./test_headers.sh
+if git status --porcelain | egrep -v '^\?\?' -q; then
+ say ERROR: uncommitted changes:
+ git status
+ exit 1
+fi
run mkdir $PKG
run cp -r $files $PKG/.
-
-# set the version number
run sed -e "/AC_INIT/s/darkstat, [^,)]*/darkstat, $VERSION/" configure.ac > $PKG/configure.ac
-
say set version: `grep '^AC_INIT' $PKG/configure.ac`
-(
- cd $PKG
+(cd $PKG
run autoconf
run autoheader
run rm -r autom4te.cache
-)
+) || exit 1
# package it up
-run tar -cf $PKG.tar $PKG
+run tar chof $PKG.tar $PKG
run bzip2 -9vv $PKG.tar
say output:
ls -l $PKG.tar.bz2