summaryrefslogtreecommitdiff
path: root/Master/tl-portable.bat
blob: 359eac4d7e4ce54342ae397ee6ae6e28678aec4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
@echo off
rem Copyright 2008-2009 Siep Kroonenberg, Tomasz M. Trzeciak.
rem You may freely use, modify and/or distribute this file.

rem First, check if this is DOS based system
rem in DOS '^' is just a normal character
if not ^x==x goto DOS

rem Abort if we are running from UNC path
if %~d0==\\ goto UNC

rem use provided Perl
set PERL5LIB=%~dp0tlpkg\tlperl\lib
path %~dp0bin\win32;%path%

rem start new command interperter with customized prompt and window title
rem reuse console window of this interpreter and terminate it after that
start /b "TL-SHELL" "%ComSpec%" /k "title TL-SHELL& prompt TL$S%prompt%"
exit

:UNC
echo Cannot run from UNC path.
echo Map network drive to a drive letter and rerun the script.
echo You can use pushd/popd commands for temporary mapping.
pause
exit /b 1

:DOS
echo DOS and Windows 9x systems are not supported. Sorry.
echo Windows 2000 or newer is required.
pause