[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Making a script to update and compile from CVS
From: |
Han Boetes |
Subject: |
Re: Making a script to update and compile from CVS |
Date: |
Fri, 14 Jan 2005 20:38:39 +0059 |
User-agent: |
Mutt/1.5.6i |
Hi,
I checked out emacs in ~/nfs/Emacs/emacs--multi-tty And in
~/nfs/Emacs/openbsd and ~/nfs/Emacs/linux I run this ``script,''
which creates simple tarball packages, which you can install with:
tar xzf path/to/emacs\#21.3.50-$timestamp.pkg.tar.gz -C /
and uninstall with
cd /
tar tzf path/to/emacs\#21.3.50-$timestamp.pkg.tar.gz|xargs rm
Or get this simple package manager:
http://www.fukt.bth.se/~per/pkgutils/
Or change the ``install_target'' to whatever you like:
MAKE=gmake
SRCDIR=../emacs--multi-tty
opties='--without-sound'
CFLAGS='-Os -g -pipe' # -DGC_MCHECK=1
PKG=$PWD/../fake
beep()
{
echo -en '\a'
}
install_target()
{
if [ -e $PKG ]; then
echo sudo rm -rf $PKG
sudo rm -rf $PKG
fi
$MAKE install DESTDIR=$PKG #prefix=$PKG/usr/local
# find \
# $PKG/usr/local/share/emacs/21.3.50/{leim,lisp} \
# $PKG/usr/local/share/emacs/site-lisp \
# -name "*.el"|while read line; do
# if [ -r ${line}c ]; then
# rm $line
# fi
# done
find \
$PKG/usr/local -type d -name '.arch-ids'|xargs rm -rf
rm -rf $PKG/usr/local/var/ $PKG/usr/local/bin/emacs-*
beep
echo 'Are you there?'
read nop
echo sudo chown -R root:wheel $PKG
sudo chown -R root:wheel $PKG
cd $PKG
timestamp="$(date '+%Y%m%d')"
gtar czf "../emacs#21.3.50-$timestamp.pkg.tar.gz" usr
echo sudo rm -rf $PKG
sudo rm -rf $PKG
cd ~/nfs/Emacs
echo "sudo pkgadd -u emacs\#21.3.50-$timestamp.pkg.tar.gz"
}
con_figure()
{
CFLAGS=$CFLAGS CC=$CC $SRCDIR/configure $opties
'--prefix=$(DESTDIR)/usr/local'
}
case $1 in
bootstrap)
[ -r Makefile ] && make maintainer-clean
con_figure
$MAKE bootstrap
install_target
;;
uninstall)
[ -r Makefile ] || con_figure
beep
sudo $MAKE uninstall
sudo rm -rf /usr/local/libexec/emacs
# sudo rm -rf /usr/local/share/emacs # niet doen!
sudo rm -rf /usr/local/var/games/emacs
;;
'')
con_figure
$MAKE $MAKEOPTS
cd lisp
$MAKE recompile EMACS=../src/emacs
cd -
$SRCDIR/admin/quick-install-emacs --prune-only .
install_target
;;
install)
install_target
;;
*)
echo 'what?'
false
;;
esac
# Han