[BACK]Return to mkrelease.sh CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / cvsweb

File: [cvsweb.bsd.lv] / cvsweb / mkrelease.sh (download)

Revision 3.1, Sun Sep 25 20:27:44 2005 UTC (14 years, 10 months ago) by scop
CVS Tags: FreeBSD-cvsweb-3_0_6

Add release tarball creator script.

#!/bin/bash

# $FreeBSD$

if [ -z "$1" ] ; then
    echo "Error: release number required."
    exit 1
fi

set -e

pwd=$(cd $(dirname $0) ; pwd)
rm -f cvsweb-$1.tar*

tmp=`mktemp -d /tmp/.cvsweb.XXXXXX` || exit 1
mkdir $tmp/cvsweb-$1

cp -pR \
  ChangeLog \
  css \
  cvsweb.cgi \
  cvsweb.conf* \
  enscript \
  icons \
  INSTALL \
  NEWS \
  README \
  samples \
  TODO \
  $tmp/cvsweb-$1

cd $tmp
find cvsweb-$1 -type d | xargs chmod 755
find cvsweb-$1 -type f | xargs chmod 644
tar cv --owner=0 --group=0 --exclude CVS --exclude bundle \
  -f $pwd/cvsweb-$1.tar cvsweb-$1
cd $pwd
rm -rf $tmp

gzip --best cvsweb-$1.tar
md5sum cvsweb-$1.tar.gz \
| gpg --no-emit-version --default-key scop@FreeBSD.org --clearsign \
> cvsweb-$1.tar.gz.md5
chmod 644 cvsweb-$1.tar.gz*