2001-08-07 04:05:50 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# exportit -- a simple little script to export something and
|
|
|
|
# make a tarbal of it, in mostly automated fasion. Could do
|
|
|
|
# more error checking, but if things are happy, it works. :-)
|
|
|
|
|
2001-08-07 04:08:58 +02:00
|
|
|
# name you wanna call this... Perhaps this should be `basename
|
|
|
|
# $path`, but whatever:
|
2001-08-07 04:05:50 +02:00
|
|
|
name=ttyload
|
|
|
|
|
2001-08-07 04:08:58 +02:00
|
|
|
# automagical settings for things:
|
2001-08-07 04:05:50 +02:00
|
|
|
path=`cat CVS/Repository`
|
|
|
|
version=`cat Version`
|
|
|
|
cvsvers=${name}_`echo "$version" | sed -e 's/[ \.]/_/g'`
|
|
|
|
dirname="$name-$version"
|
|
|
|
|
2001-08-07 04:08:58 +02:00
|
|
|
# let the user know what the settings came up with:
|
2001-08-07 04:05:50 +02:00
|
|
|
echo "Creating export of $name version $version (CVS: $cvsvers)"
|
|
|
|
|
2001-08-07 04:08:58 +02:00
|
|
|
# export, and if that fails, bail.
|
|
|
|
cvs export -d "$dirname" -r "$cvsvers" $path || exit 1
|
|
|
|
|
|
|
|
# then tar and gzip:
|
2001-08-07 04:05:50 +02:00
|
|
|
tar cvf "$dirname.tar" "$dirname"
|
|
|
|
gzip -9fv "$dirname.tar"
|