Commit 15a10119 authored by Zolnierczuk, Piotr's avatar Zolnierczuk, Piotr
Browse files

added missing latex for RHEL9

parent 12afe3c6
Loading
Loading
Loading
Loading
+81 −0
Original line number Diff line number Diff line
#!/bin/sh

TMPDIR=$HOME/Downloads
TEXMFDIR=$HOME/texmf

download=0
install=0

download_pkgs()
{
	mkdir -p $TMPDIR
	cd $TMPDIR
	wget https://mirrors.ctan.org/install/graphics/pgf/contrib/pgfplots.tds.zip 
	wget https://mirrors.ctan.org/macros/latex/contrib/appendix.zip 
	wget https://mirrors.ctan.org/macros/latex/contrib/draftwatermark.zip 
	wget https://mirrors.ctan.org/macros/latex/contrib/bigfoot.zip 
	wget https://mirrors.ctan.org/macros/latex/contrib/relsize.zip 
	wget https://mirrors.ctan.org/macros/latex/contrib/cprotect.zip 
}


install_pkgs()
{
	mkdir -p $TEXMFDIR
	cd $TEXMFDIR
	unzip $TMPDIR/pgfplots.tds.zip

	mkdir -p $TEXMFDIR/tex/latex/contrib
	cd	 $TEXMFDIR/tex/latex/contrib
	unzip $TMPDIR/appendix.zip
	unzip $TMPDIR/draftwatermark.zip
	unzip $TMPDIR/bigfoot.zip
	unzip $TMPDIR/relsize.zip
	unzip $TMPDIR/cprotect.zip

	for f in draftwatermark bigfoot appendix; do
		cd $TEXMFDIR/tex/latex/contrib/$f
		latex $f.ins
		cd -
	done

	for f in cprotect; do
		cd $TEXMFDIR/tex/latex/contrib/$f
		latex $f.dtx
		cd -
	done
}



usage()
{
    if test ! -z "$1"; then echo "$argv0: $1"; fi
    echo "usage: $argv0  [options]" 
    echo "options: "
    echo "         -d    : download"
    echo "         -i    : install"
    echo "         -h    : this help"
}

while getopts "dih" o; do
    case "${o}" in
		d)
        download=1
		;;
		i)
		install=1
		;;
		h)
		usage
		exit 0
		;;
		*)
		usage
		exit 1
    esac
done

if [ $download -ne 0 ]; then download_pkgs ; fi
if [ $install  -ne 0 ]; then install_pkgs  ; fi