Advertisement
Guest User

portableshell.bat

a guest
Mar 8th, 2016
301
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.91 KB | None | 0 0
  1. @echo off
  2.  
  3. set drive=%~dp0
  4. set drivep=%drive%
  5. if #%drive:~-1%# == #\# set drivep=%drive:~0,-1%
  6.  
  7. set PATH=%drivep%\perl\site\bin;%drivep%\perl\bin;%drivep%\c\bin;%PATH%
  8. rem env variables
  9. set TERM=
  10. rem avoid collisions with other perl stuff on your system
  11. set PERL_JSON_BACKEND=
  12. set PERL_YAML_BACKEND=
  13. set PERL5LIB=
  14. set PERL5OPT=
  15. set PERL_MM_OPT=
  16. set PERL_MB_OPT=
  17.  
  18. if not #%1# == ## "%drivep%\perl\bin\perl.exe" %* & goto END
  19.  
  20. echo ----------------------------------------------
  21. echo  Welcome to Strawberry Perl Portable Edition!
  22. echo  * URL - http://www.strawberryperl.com/
  23. echo  * see README.TXT for more info
  24. echo ----------------------------------------------
  25. perl -MConfig -e "printf("""Perl executable: %%s\nPerl version   : %%vd / $Config{archname}\n""", $^X, $^V)" 2>nul
  26. if ERRORLEVEL==1 echo.&echo FATAL ERROR: 'perl' does not work; check if your strawberry pack is complete!
  27. echo.
  28. cmd /K
  29.  
  30. :END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement