#!/bin/bash


# We're going to run this in the MacTeXDVD working directory...
WORK=`pwd`


echo "Removing old file tree at ${WORK}/root"
rm -rf ${WORK}/root

# Copy files to root
mkdir -p ${WORK}/root/Library/TeX/.scripts
cp ${WORK}/texdist ${WORK}/root/Library/TeX/.scripts/texdist

chmod -R 755 ${WORK}/root/Library/TeX/
chgrp -R wheel ${WORK}/root/Library/TeX/


# echo "Adding man symbolic link"
# ln -s ../../texmf/doc/man /usr/local/texlive/2013/bin/universal-darwin/man

# echo "Adding man symbolic link"
# ln -s ../../texmf/doc/man /usr/local/texlive/2013/bin/x86_64-darwin/man



