SCM

SCM Repository

[matrix] View of /pkg/src/CSparse_install.sh
ViewVC logotype

View of /pkg/src/CSparse_install.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1382 - (download) (as text) (annotate)
Wed Aug 16 16:34:27 2006 UTC (13 years, 6 months ago) by maechler
File size: 953 byte(s)
new script for CSparse updating
#!/bin/sh
#
URL=http://www.cise.ufl.edu/research/sparse/CSparse
tarFile=CSparse.tar.gz
## subdirectory *inside* tar file:
sDir=CSparse/Source
# ----------------- a "full path" for the current directory:
MatrixDir=`dirname $0`; cd $MatrixDir; MatrixDir=`pwd`
if [ -d $MatrixDir ]
then echo "Downloading into directory '$MatrixDir' .."
else echo "no directory '$MatrixDir' .. exiting"; exit 3
fi
cd $MatrixDir
#
wget $URL/$tarFile
#
if [ ! -r $tarFile ]; then echo "no file $tarFile .. exiting"; exit 1 ; fi
## extract only the part we want
tar zxf $tarFile $sDir
if [ ! -d $sDir ]; then echo "no directory $sDir .. exiting"; exit 2 ; fi
echo -n "Moving and cat'ing files from $sDir ..	 "
cd $sDir
chmod a+r cs.h
mv  cs.h   $MatrixDir
cat cs_*.c | sed -e '1 p' -e '/^#include/d' > $MatrixDir/cs.c
echo '[Ok]'
echo -n "cleaning up $sDir ..			 "
## keep the [TAB]s here               ^^
cd $MatrixDir
rm -rf $tarFile $sDir
rmdir `dirname $sDir`
echo '[Ok]'

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge