5 # This script creates the directory for auto-generated scripts and gets
6 # the current user's account ready to use YETI.
8 # Note: this does not yet ensure that the YETI profile is executed on
9 # shell startup. that can be added manually by editing your .bashrc file.
10 # read the examples/bashrc_user file for more details.
12 YETI_CORE_SCRIPTS_DIR="$(dirname "$0" | tr '\\\\' '/' )"
13 THIS_TOOL_NAME="$(basename "$0")"
15 # check this scripts directory; do we find this script there?
16 pushd "/" &>/dev/null # jump to root so relative paths have to fail.
17 if [ ! -f "$YETI_CORE_SCRIPTS_DIR/$THIS_TOOL_NAME" ]; then
18 echo "This script must be run using its full pathname. This enables the script to"
19 echo "locate the proper folders. Please try again with the full path, e.g.:"
20 echo " bash /home/fred/codeplex/$THIS_TOOL_NAME"
25 # set up the yeti dir if it's not already defined.
26 pushd "$YETI_CORE_SCRIPTS_DIR/../.." &>/dev/null
27 export YETI_DIR="$(pwd)"
29 #echo yeti is $YETI_DIR
31 export YETI_SCRIPTS="$YETI_DIR/scripts"
32 export SHELLDIR="$YETI_SCRIPTS"
34 # GENERADIR is where the generated files yeti uses are located.
35 export GENERADIR="$HOME/.zz_auto_gen"
36 if [ ! -z "$WINDIR" -o ! -z "$windir" ]; then
37 # assume they are using windoze.
38 export GENERADIR="$TMP/zz_auto_gen"
40 if [ ! -d "$GENERADIR" ]; then
44 YETIVARS="$GENERADIR/yeti_variables.sh"
46 for i in YETI_DIR YETI_SCRIPTS SHELLDIR GENERADIR; do
47 echo "export $i=${!i}" >>"$YETIVARS"
50 # create our common aliases.
51 perl "$YETI_SCRIPTS/core/generate_aliases.pl"
54 echo Established this set of variables to describe how to find yeti assets: