리눅스에서 글 올리다 보니 파일 업로드는 못하고요. 그냥 배치 파일 내용을 밑에다 씁니다. 그런데 이게 동작하려면 윈도용 sed를 설치하셔야 해요. 이 프로그램은 Tex Live에 포함되어 있지 않은 것으로 압니다. 그리고 디렉토리 이름을 조금 수정하셔야 합니다.
@echo off
rem tlupdateall.bat
rem written by Karnes.
rem ----------------------------
rem catch tl dir
pushd %TEMP%
kpsewhich latex.ltx >_tmp
sed -e "s/texmf-dist\/tex\/latex\/base\/latex.ltx$//g" <_tmp >__tmp
sed -e "s/^/set TMPTLDIR=/g" <__tmp >__tmp.bat
sed -e "s/^/set BSTMPTLDIR=/g" <__tmp >___tmp
sed -e "s/\//\\/g" <___tmp >___tmp.bat
todos __tmp.bat >%TEMP%\null
todos ___tmp.bat >%TEMP%\null
call __tmp.bat
call ___tmp.bat
del _tmp __tmp ___tmp __tmp.bat ___tmp.bat
popd
if .%BSTMPTLDIR%.==.. goto ERROR
:RUNME
rem set TLsite=http://ftp.kaist.ac.kr/tex-archive/systems/texlive/tlnet
set TLsite=http://ftp.ktug.or.kr/tex-archive/systems/texlive/tlnet
set KCsite=http://ftp.ktug.or.kr/KTUG/texlive/2009
set TEXLIVEFOLDER=%BSTMPTLDIR%
rem %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if .%1.==.-down. goto DOWNLOAD
if .%1.==.-nodown. goto NODOWNLOAD
rem default = NODOWNLOAD
goto NODOWNLOAD
:DOWNLOAD
if exist update-tlmgr-latest.exe del update-tlmgr-latest.exe
copy /Y %TEXLIVEFOLDER%\tlpkg\installer\wget\wget.exe .
wget %TLSITE%/update-tlmgr-latest.exe
update-tlmgr-latest.exe
pause
goto RUNALL
:NODOWNLOAD
call tlmgr --repository=%TLsite% update --self
if not .%errorlevel%.==.0. goto ERROR
:RUNALL
call tlmgr --repository=%TLsite% update --all
call tlmgr --repository=%KCsite% update --all
goto END
:ERROR
echo Something wrong happened.
echo Perhaps texlive isn't set up properly or tlmgr failed.
echo.
echo Try later.
:END
KTUG 한국 텍 사용자 그룹
리눅스에서 글 올리다 보니 파일 업로드는 못하고요. 그냥 배치 파일 내용을 밑에다 씁니다. 그런데 이게 동작하려면 윈도용 sed를 설치하셔야 해요. 이 프로그램은 Tex Live에 포함되어 있지 않은 것으로 압니다. 그리고 디렉토리 이름을 조금 수정하셔야 합니다.
@echo off
rem tlupdateall.bat
rem written by Karnes.
rem ----------------------------
rem catch tl dir
pushd %TEMP%
kpsewhich latex.ltx >_tmp
sed -e "s/texmf-dist\/tex\/latex\/base\/latex.ltx$//g" <_tmp >__tmp
sed -e "s/^/set TMPTLDIR=/g" <__tmp >__tmp.bat
sed -e "s/^/set BSTMPTLDIR=/g" <__tmp >___tmp
sed -e "s/\//\\/g" <___tmp >___tmp.bat
todos __tmp.bat >%TEMP%\null
todos ___tmp.bat >%TEMP%\null
call __tmp.bat
call ___tmp.bat
del _tmp __tmp ___tmp __tmp.bat ___tmp.bat
popd
if .%BSTMPTLDIR%.==.. goto ERROR
:RUNME
rem set TLsite=http://ftp.kaist.ac.kr/tex-archive/systems/texlive/tlnet
set TLsite=http://ftp.ktug.or.kr/tex-archive/systems/texlive/tlnet
set KCsite=http://ftp.ktug.or.kr/KTUG/texlive/2009
set TEXLIVEFOLDER=%BSTMPTLDIR%
rem %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if .%1.==.-down. goto DOWNLOAD
if .%1.==.-nodown. goto NODOWNLOAD
rem default = NODOWNLOAD
goto NODOWNLOAD
:DOWNLOAD
pushd %TEMP%
if exist update-tlmgr-latest.exe del update-tlmgr-latest.exe
copy /Y %TEXLIVEFOLDER%\tlpkg\installer\wget\wget.exe .
wget %TLSITE%/update-tlmgr-latest.exe
update-tlmgr-latest.exe
pause
popd
goto RUNALL
:NODOWNLOAD
call tlmgr --repository=%TLsite% update --self
if not .%errorlevel%.==.0. goto ERROR
goto RUNALL
:RUNALL
call tlmgr --repository=%TLsite% update --all
call tlmgr --repository=%KCsite% update --all
goto END
:ERROR
echo Something wrong happened.
echo Perhaps texlive isn't set up properly or tlmgr failed.
echo.
echo Try later.
goto END
:END
pause