#!/bin/bash

###-------------------------------------// Variables

DESTINATION=""

CURRENT_DIR=""

LIBNAME="Longbeard"
LIBPATH="$( cd "$( dirname "$0" )" && pwd )"
LIBVERSION=""

PROJECT="-"
META="."$LIBNAME"Project"

ALL_ARGUMENTS=( $@ )
MAIN_COMMAND=""
MAIN_ARGUMENTS=()

declare -A COMMANDS
declare -A FILTERS

###-------------------------------------// Colors

BLUE_COLOR="\033[0;34m"     #Reserved names/methods
GREEN_COLOR="\033[0;32m"    #Key words/variables
YELLOW_COLOR="\033[0;33m"   #Paths
RED_COLOR="\033[0;31m"      #Errors
PURPLE_COLOR="\033[0;35m"   #Warnings
CYAN_COLOR="\033[0;36m"     #External Program output
GRAY_COLOR="\033[0;37m"     #Comments/Labels
RESET="\e[0m"

###-------------------------------------// Functions


format_path () {
  raw_path=""

  # Get a Windows path under MinGW or Cygwin
  raw_path="$( cd -P "$( dirname "$1" )" && (pwd -W 2>/dev/null || cygpath -w $(pwd) 2>/dev/null || pwd))"
  if [ "${raw_path%${raw_path#?}}" != "/" ] ; then
    raw_path="$( echo "$raw_path" | sed -e 's@\\@/@g' )"
  fi

  echo "$raw_path"
}

front_door () {
	CURRENT_DIR=$(format $PWD)
	cd $LIBPATH
}

back_door () {
	echo -e $RESET
	cd $CURRENT_DIR 
}

# -- Entry Point --


front_door
back_door
exit 0