Created
March 6, 2012 05:34
-
-
Save tdkn/1983823 to your computer and use it in GitHub Desktop.
USBメモリにCygwinを入れて使うときのCygwin.bat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: 当バッチファイルが置かれているドライブのF:\home\userにホームディレクトリを固定 | |
:: どのパソコンに刺しても対応できるようにドライブレターが ~d0 のあたりで展開される | |
:: | |
:: 参考文献 | |
:: dotcloudとfluxflexの開発環境を、USBメモリで持ち運ぶ(Windows限定) | |
:: http://blog.alglab.net/archives/24 | |
:: 「%~dp0」でカレントディレクトリが取得できる訳 | |
:: http://d.hatena.ne.jp/GARAPON/20100615/1276612386 | |
:: 環境 | |
:: $uname -a | |
:: CYGWIN_NT-5.1 ****** 1.7.11(0.260/5/3) 2012-02-24 14:05 i686 Cygwin | |
@echo off | |
::F: | |
::chdir F:\cygwin\bin | |
set HOME=%~d0home\user | |
%~d0 | |
chdir %~dp0bin | |
bash --login -i |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment