first check-in of feisty meow codebase. many things broken still due to recent
[feisty_meow.git] / scripts / clam / cpp / ms_root_dir.sh
1 #!/bin/bash
2 # spits out the root directory of visual studio, calculated from the common
3 # tools directory that always seems to be reliably set.
4
5 # code stolen from vis_stu_vars...
6 if [ -z "$VSxTOOLS" ]; then
7   export VSxTOOLS="$VS90COMNTOOLS"
8   if [ -z "$VSxTOOLS" ]; then
9     export VSxTOOLS="$VS80COMNTOOLS"
10   fi
11 fi
12 if [ -z "$VSxTOOLS" ]; then
13   echo Failure to locate visual studio tools.
14   exit 33
15 fi
16
17 short_path "$VSxTOOLS" | sed -e 's/\\/\//g' | sed -e 's/^\(.*\)\/[^\/]*\/[^\/]*[\/]$/\1/'
18