#!/bin/bash # Initialize directory constants # $THIS_DIR = The directory where this script runs in # $INI_DIR = The directoryy the user is calling from # $REFERRER_DIR = The directory the user is calling from, canonical form # $PREV_DIR = The directory ../ WITHOUT resolving the symlink! INI_DIR=$( pwd ); REFERRER_DIR=$( readlink -f "$INI_DIR" ); DIR=$( dirname "$0" ); cd "$DIR"; THIS_DIR=$( pwd ); cd "$THIS_DIR/.."; PREV_DIR=$( pwd ); cd "$INI_DIR";