Skip to content

Instantly share code, notes, and snippets.

@stouset
Created April 25, 2011 19:38
Show Gist options
  • Save stouset/941054 to your computer and use it in GitHub Desktop.
Save stouset/941054 to your computer and use it in GitHub Desktop.
Profile environment
export DOT_PROFILE=~/.profile.git
export PROFILE_BIN=$DOT_PROFILE/bin
export PROFILE_HOME_D=$DOT_PROFILE/home.d
export PROFILE_SYSTEM_D=$DOT_PROFILE/system.d
export SYSTEM_BASE=""
export SYSTEM_TYPE=""
export SYSTEM_VERSION=""
case "$(uname -s)" in
Darwin)
SYSTEM_BASE="OSX"
SYSTEM_VERSION="$(uname -r)"
case $SYSTEM_VERSION in
10.*)
SYSTEM_TYPE="SnowLeopard"
;;
9.*)
SYSTEM_TYPE="Leopard"
;;
8.*)
SYSTEM_TYPE="Tiger"
;;
esac
;;
Linux)
SYSTEM_BASE="Linux"
SYSTEM_TYPE="$(cat /etc/issue | cut -d " " -f 1)"
SYSTEM_VERSION="$(cat /etc/issue | cut -d " " -f 2)"
;;
CYGWIN_NT-5.1)
SYSTEM_BASE="Windows"
SYSTEM_TYPE="$(uname -i)"
SYSTEM_VERSION="$(uname -r | cut -d"(" -f1)"
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment