wok rev 1625

get-texlive add perl to DEPEND, ask user to confirm installation
author Pierre-Jean Fichet <sygne@ombres.eu>
date Thu Oct 23 20:14:35 2008 +0000 (2008-10-23)
parents b19e50dd80d8
children fc3d0463ba33
files get-texlive/receipt get-texlive/stuff/get-texlive
line diff
     1.1 --- a/get-texlive/receipt	Thu Oct 23 20:07:24 2008 +0000
     1.2 +++ b/get-texlive/receipt	Thu Oct 23 20:14:35 2008 +0000
     1.3 @@ -3,6 +3,7 @@
     1.4  PACKAGE="get-texlive"
     1.5  VERSION="2008"
     1.6  CATEGORY="office"
     1.7 +DEPENDS="wget perl"
     1.8  WEB_SITE="http://www.tug.org/texlive/"
     1.9  SHORT_DESC="get texlive distribution for tex, latex..."
    1.10  MAINTAINER="sygne@ombres.eu"
     2.1 --- a/get-texlive/stuff/get-texlive	Thu Oct 23 20:07:24 2008 +0000
     2.2 +++ b/get-texlive/stuff/get-texlive	Thu Oct 23 20:14:35 2008 +0000
     2.3 @@ -6,7 +6,7 @@
     2.4  CATEGORY="office"
     2.5  SHORT_DESC="latex text processor"
     2.6  MAINTAINER="sygne@ombres.eu"
     2.7 -DEPENDS="wget"
     2.8 +DEPENDS="wget perl"
     2.9  SOURCE="install-tl"
    2.10  TARBALL="$SOURCE-unx.tar.gz"
    2.11  WEB_SITE="http://www.tug.org/$PACKAGE/"
    2.12 @@ -98,21 +98,25 @@
    2.13  post_install()
    2.14  {
    2.15  	# add texlive dir to PATH.
    2.16 -	cp /etc/profile /etc/profile.old
    2.17 -	sed "/^PATH=\"/ aPATH=\"/usr/local/\$PACKAGE/\$VERSION/bin/i386-linux/:\\\$PATH\"" \
    2.18 -	/etc/profile >> profile
    2.19 -	mv profile /etc/profile
    2.20 +	if ! grep -q "/usr/local/\$PACKAGE/\$VERSION/bin/i386-linux/" /etc/profile
    2.21 +		then
    2.22 +		echo "adding /usr/local/\$PACKAGE/\$VERSION/bin/i386-linux/ to PATH"
    2.23 +		cp /etc/profile /etc/profile.old
    2.24 +		sed "/^PATH=\"/ aPATH=\"/usr/local/\$PACKAGE/\$VERSION/bin/i386-linux/:\\\$PATH\"" \
    2.25 +/etc/profile >> profile
    2.26 +		mv profile /etc/profile
    2.27 +	fi
    2.28  
    2.29  	echo -e "
    2.30  
    2.31 -\033[1;33m - A texlive minimal scheme is now installed - \033[0;m
    2.32 +\033[1;33m - A texlive minimal scheme is now installed - \033[0m
    2.33  
    2.34  Verify that \033[1mPATH\033[0m is well formatted in /etc/profile,
    2.35  and contain \033[1m/usr/local/\$PACKAGE/\$VERSION/bin/i386-linux/\033[0m
    2.36  
    2.37  To improve texlive, run \033[1mtlmgr\033[0m as root.
    2.38  If you prefer graphicals interfaces, install perl-tk,
    2.39 -and run\033[1mtlmgr gui\033[0m.
    2.40 +and run\033[1m tlmgr gui\033[0m.
    2.41  
    2.42  The tlmgr man page can be found here:
    2.43  http://tug.org/texlive/doc/tlmgr.html
    2.44 @@ -123,8 +127,15 @@
    2.45  
    2.46  # Pack
    2.47  tazpkg pack $PACKAGE-$VERSION
    2.48 -# Install pseudo package
    2.49 -tazpkg install $PACKAGE-$VERSION.tazpkg
    2.50 +
    2.51 +
    2.52 +echo -n "\nPlease confirm installation of $PACKAGE-$VERSION (y/N): "
    2.53 +read CONFIRM
    2.54 +if [ $CONFIRM = "y" ]
    2.55 +	then
    2.56 +	# Install pseudo package
    2.57 +	tazpkg install $PACKAGE-$VERSION.tazpkg
    2.58 +fi
    2.59  
    2.60  # Clean
    2.61  cd $TOP