Renew bat file when location changed
This commit is contained in:
parent
bc0eb1efb3
commit
ee352550ae
@ -35,3 +35,6 @@ alias wget='wget --directory-prefix="$HOME/Downloads"'
|
|||||||
|
|
||||||
# ssh-agent key lifetime
|
# ssh-agent key lifetime
|
||||||
alias ssh-add="ssh-add -t 43200"
|
alias ssh-add="ssh-add -t 43200"
|
||||||
|
|
||||||
|
# Pretty print sqlite3
|
||||||
|
alias sqlite3="sqlite3 -header -column"
|
||||||
|
@ -4,7 +4,6 @@ if ! $IS_CYGWIN; then
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo $PATH | grep -q MSBuild
|
|
||||||
if [ -n "$FrameworkVersion" ]; then
|
if [ -n "$FrameworkVersion" ]; then
|
||||||
alias vsshell='echo "FrameworkVersion $FrameworkVersion"'
|
alias vsshell='echo "FrameworkVersion $FrameworkVersion"'
|
||||||
return
|
return
|
||||||
@ -22,7 +21,10 @@ function vsshell {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if [ -f "$VS_SHELL_BAT" ]; then
|
if [ -f "$VS_SHELL_BAT" ]; then
|
||||||
|
_PATH=$( cygpath "$( grep -o "^@REM FILE_PATH: .\+" "$VS_SHELL_BAT" | cut -c 17- )" )
|
||||||
|
if [ -f "$_PATH" ]; then
|
||||||
return
|
return
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
START_MENU="$( cygpath $ProgramData )/Microsoft/Windows/Start Menu/"
|
START_MENU="$( cygpath $ProgramData )/Microsoft/Windows/Start Menu/"
|
||||||
@ -30,5 +32,6 @@ START_MENU="$( cygpath $ProgramData )/Microsoft/Windows/Start Menu/"
|
|||||||
_PATH=$( find "$START_MENU" -name "*Command Prompt*" | grep "Visual Studio" | grep x64 | grep Native | xargs -I % readshortcut % -r | grep -o "\"\([^\"]\+\)\"" )
|
_PATH=$( find "$START_MENU" -name "*Command Prompt*" | grep "Visual Studio" | grep x64 | grep Native | xargs -I % readshortcut % -r | grep -o "\"\([^\"]\+\)\"" )
|
||||||
|
|
||||||
echo "@echo off" > "$VS_SHELL_BAT"
|
echo "@echo off" > "$VS_SHELL_BAT"
|
||||||
|
echo "@REM FILE_PATH: ${_PATH:1:-1}" >> "$VS_SHELL_BAT"
|
||||||
echo "CALL $_PATH" >> "$VS_SHELL_BAT"
|
echo "CALL $_PATH" >> "$VS_SHELL_BAT"
|
||||||
echo "START $( where mintty ) -i /Cygwin-Terminal.ico -" >> "$VS_SHELL_BAT"
|
echo "START $( where mintty ) -i /Cygwin-Terminal.ico -" >> "$VS_SHELL_BAT"
|
||||||
|
Loading…
Reference in New Issue
Block a user