Created
August 20, 2015 14:28
-
-
Save bdkosher/3be94e379c03fdadbb40 to your computer and use it in GitHub Desktop.
I use Windows and throw a bunch of .bat files in a PATH directory that run tools (mvn, gradle, etc.). This lets me avoid having to set each tool's /bin folder on my PATH. However, Cygwin doesn't work with .bat files, so this .bashrc snippet will create an alias for all the batch files based on their names.
This file contains hidden or 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
| BATCH_FILES=/cygdrive/c/Users/jwolf2/bin/*.bat | |
| for bfile in $BATCH_FILES; do | |
| bname=${bfile##*/} | |
| bcmd=${bname%.*} | |
| alias $bcmd=$bfile | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment