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 ORIGINATING_FOLDER="$( \cd "$(\dirname "$0")" && \pwd )"
13 YETI_CORE_SCRIPTS_DIR="$(echo "$ORIGINATING_FOLDER" | tr '\\\\' '/' )"
14 THIS_TOOL_NAME="$(basename "$0")"
16 ## check this scripts directory; do we find this script there?
17 #pushd "/" &>/dev/null # jump to root so relative paths have to fail.
18 #if [ ! -f "$YETI_CORE_SCRIPTS_DIR/$THIS_TOOL_NAME" ]; then
19 # echo "This script must be run using its full pathname. This enables the script to"
20 # echo "locate the proper folders. Please try again with the full path, e.g.:"
21 # echo " bash /home/fred/codeplex/$THIS_TOOL_NAME"
26 # set up the yeti dir.
27 pushd "$YETI_CORE_SCRIPTS_DIR/../.." &>/dev/null
28 export YETI_DIR="$(pwd)"
30 #echo yeti is $YETI_DIR
32 export YETI_SCRIPTS="$YETI_DIR/scripts"
33 export SHELLDIR="$YETI_SCRIPTS"
35 # GENERADIR is where the generated files yeti uses are located.
36 export GENERADIR="$HOME/.zz_auto_gen"
37 if [ ! -z "$WINDIR" -o ! -z "$windir" ]; then
38 # assume they are using windoze.
39 export GENERADIR="$TMP/zz_auto_gen"
41 if [ ! -d "$GENERADIR" ]; then
45 YETIVARS="$GENERADIR/yeti_variables.sh"
47 for i in YETI_DIR YETI_SCRIPTS SHELLDIR GENERADIR; do
48 echo "export $i=${!i}" >>"$YETIVARS"
51 # create our common aliases.
52 perl "$YETI_SCRIPTS/core/generate_aliases.pl"
55 echo Established this set of variables to describe how to find yeti assets: