diff --git a/.gitignore b/.gitignore index 0c3c3a6f92..17a494890c 100755 --- a/.gitignore +++ b/.gitignore @@ -21,8 +21,8 @@ indra/.distcc build-vc80/ build-vc100/ build-vc120/ -build-vc[0-9]*-32/ -build-vc[0-9]*-64/ +build-vc[0-9]*-32*/ +build-vc[0-9]*-64*/ indra/CMakeFiles indra/build-vc[0-9]* indra/lib/mono/1.0/*.dll @@ -98,4 +98,7 @@ indra/newview/pilot.xml indra/newview/exoflickrkeys.h indra/newview/fsdiscordkey.h my_autobuild.xml -.vscode \ No newline at end of file +.vscode +*.srctrlbm +*.srctrldb +*.srctrlprj diff --git a/build_target.sh b/build_target.sh new file mode 100644 index 0000000000..75522e1fc8 --- /dev/null +++ b/build_target.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +if [ $# -eq 0 ] +then + echo "USAGE: $0 " + exit 1 +fi + +if [ $1 == "SL" ] || [ $1 == "OS" ] +then + [ $1 == "SL" ] && l="OS" || l="SL" +else + if [ $1 == "test" ] || [ $1 == "?" ] + then + if [ -d "./build-vc150-64" ] + then + c="Unknown" + if [ ! -d "./build-vc150-64-SL" ] && [ -d "./build-vc150-64-OS" ] + then + c="SL" + fi + if [ -d "./build-vc150-64-SL" ] && [ ! -d "./build-vc150-64-OS" ] + then + c="OS" + fi + echo "Current build is for $c" + else + echo "No build configured" + fi + exit 0 + else + echo "Invalid target $1" + echo "USAGE: $0 " + exit 2 + fi +fi +t=$1 + +if [ -d "./build-vc150-64" ] +then + if [ ! -d "./build-vc150-64-$t" ] + then + # live folder exists + # target does not so we are probably good to go + echo "$t already setup" + exit 0 + else + # target folder exists so probably means that the setup is for the alternate + if [ ! -d "./build-vc150-64-$l" ] + then + # alternate folder not found so we rename the live target back to this + echo "Currently setup for $l. Renaming default back to $l" + `mv ./build-vc150-64 ./build-vc150-64-$l` + else + # no LAST and no TARGET exists so this is not in the right state + echo "Not setup for multi-target" + exit 3 + fi + fi +fi + +if [ -d "./build-vc150-64-$t" ] +then + # live folder exists + # target does not so we are probably good to go + echo "renaming $t to default" + `mv ./build-vc150-64-$t ./build-vc150-64` +else + echo "Not setup for target $t" + exit 4 +fi +