Unified the scripts that build the distribution archive and Debian
packages and copy everything to the right place. git-svn-id: https://samskivert.googlecode.com/svn/trunk@676 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -1,41 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $Id: build-dist.sh,v 1.3 2002/03/17 10:15:24 mdb Exp $
|
||||
#
|
||||
# Builds a distribution archive. This should be run from the top-level
|
||||
# project directory and it will place the distribution archive into the
|
||||
# directory identified by $DISTDIR.
|
||||
|
||||
USAGE="Usage: $0 distname (eg. lookuplet-1.4)"
|
||||
DISTDIR=.
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo $USAGE
|
||||
exit -1
|
||||
else
|
||||
TARGET=$1
|
||||
fi
|
||||
|
||||
# build our excludes file
|
||||
cat > .excludes <<EOF
|
||||
build-dist.sh
|
||||
CVS
|
||||
.excludes
|
||||
.cvsignore
|
||||
*.tar.gz
|
||||
*~
|
||||
EOF
|
||||
|
||||
# create our distribution directory
|
||||
mkdir /tmp/$TARGET
|
||||
|
||||
# temporarily move the distribution files into temp so that we can put
|
||||
# them into a properly named directory
|
||||
tar --exclude-from=.excludes -cf - * | tar -C /tmp/$TARGET -xf -
|
||||
|
||||
# now build the actual archive file
|
||||
tar -C /tmp -czf $DISTDIR/$TARGET.tar.gz $TARGET
|
||||
|
||||
# and clean up after ourselves
|
||||
rm -rf /tmp/$TARGET
|
||||
rm .excludes
|
||||
@@ -1,21 +1,63 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $Id: install.sh,v 1.1 2002/03/17 23:52:24 mdb Exp $
|
||||
# $Id: install.sh,v 1.2 2002/03/18 00:17:57 mdb Exp $
|
||||
#
|
||||
# Copies the Debian files to the appropriate place on my web server for
|
||||
# distribution.
|
||||
# Builds the Debian packages for the release and installs them in the
|
||||
# appropriate place on my web server for distribution.
|
||||
|
||||
DEBHOST=waywardgeeks.org
|
||||
DEBDIR=/export/wayward/pages/code/debian
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: $0 release_version (e.g. 1.2)"
|
||||
exit -1
|
||||
else
|
||||
RELEASE=$1
|
||||
shift
|
||||
fi
|
||||
|
||||
TARGET=lookuplet-$RELEASE
|
||||
|
||||
# build the distribution
|
||||
`dirname $0`/build-dist.sh $TARGET
|
||||
|
||||
# build our excludes file
|
||||
cat > .excludes <<EOF
|
||||
install.sh
|
||||
CVS
|
||||
.excludes
|
||||
.cvsignore
|
||||
*.tar.gz
|
||||
*~
|
||||
EOF
|
||||
|
||||
# create our distribution directory
|
||||
mkdir /tmp/$TARGET
|
||||
|
||||
# temporarily move the distribution files into temp so that we can put
|
||||
# them into a properly named directory
|
||||
tar --exclude-from=.excludes -cf - * | tar -C /tmp/$TARGET -xf -
|
||||
|
||||
# build the debian packages
|
||||
pushd /tmp/$TARGET
|
||||
dpkg-buildpackage -tc -rfakeroot
|
||||
|
||||
# install the debian packages on the web server
|
||||
if [ -f ../lookuplet_*.deb ]; then
|
||||
# remove any old files
|
||||
ssh waywardgeeks.org "rm $DEBDIR/pool/main/l/lookuplet/lookuplet_*"
|
||||
ssh $DEBHOST "rm $DEBDIR/pool/main/l/lookuplet/lookuplet_*"
|
||||
# copy over the new files
|
||||
scp ../lookuplet_* waywardgeeks.org:$DEBDIR/pool/main/l/lookuplet/
|
||||
scp ../lookuplet_* $DEBHOST:$DEBDIR/pool/main/l/lookuplet/
|
||||
# update the packages file
|
||||
ssh waywardgeeks.org "/export/wayward/bin/update_packages.pl"
|
||||
ssh $DEBHOST "/export/wayward/bin/update_packages.pl"
|
||||
# blow away our local copy
|
||||
rm -f ../lookuplet_*
|
||||
else
|
||||
echo "No files to install."
|
||||
fi
|
||||
|
||||
# clean up after ourselves
|
||||
cd ..
|
||||
rm -rf $TARGET
|
||||
popd
|
||||
rm .excludes
|
||||
|
||||
Reference in New Issue
Block a user