Merge branch 'master' of ssh://defaria.com/opt/git/clearscm
authorAndrew DeFaria <Andrew@DeFaria.com>
Fri, 8 Nov 2013 03:57:27 +0000 (19:57 -0800)
committerAndrew DeFaria <Andrew@DeFaria.com>
Fri, 8 Nov 2013 03:57:27 +0000 (19:57 -0800)
rc/bash_login
rc/client_scripts/Axcient [deleted file]
rc/functions
rc/git [new file with mode: 0644]

index f39ebb3..0008953 100644 (file)
@@ -1,7 +1,7 @@
 ################################################################################
 #
 # File:         $RCSfile: bash_login,v $
-# Revision:    $Revision: 1.29 $
+# Revision:        $Revision: 1.29 $
 # Description:  bash startup file
 # Author:       Andrew@DeFaria.com
 # Created:      Mon Aug 20 17:35:01  2001
@@ -116,6 +116,11 @@ if [ -f ~/.rc/multisite ]; then
   source ~/.rc/multisite
 fi
 
+# Git Stuff
+if [ -f ~/.rc/git ]; then
+  source ~/.rc/git
+fi
+
 # Import shell functions:
 if [ -f ~/.rc/functions ]; then
   source ~/.rc/functions
@@ -223,6 +228,11 @@ fi
 # Color man pages with yellow keywords
 export LESS_TERMCAP_md=$'\e[1;33m'
 
+# If /opt/clearscm/lib is around then set PERL5LIB
+if [ -d /opt/clearscm/lib ]; then
+  export PERL5LIB="$PERL5LIB:/opt/clearscm/lib"
+fi
+
 # Client specific customizations
 for script in $(\ls ~/.rc/client_scripts); do
   # This is not working as long as ACLs are not supported from the remote
diff --git a/rc/client_scripts/Axcient b/rc/client_scripts/Axcient
deleted file mode 100755 (executable)
index 9d80ec2..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-################################################################################
-#
-# File:         $RCSfile: Axcient,v $
-# Revision:    $Revision: $
-# Description: Client specific start up for Axcient
-# Author:       Andrew@DeFaria.com
-# Created:     Tue Aug 13 11:49:46 PDT 2013
-# Modified:     $Date: $
-# Language:     bash
-#
-# (c) Copyright 2013, Andrew@DeFaria.com, all rights reserved.
-#
-################################################################################
-function git () {
-  # Need to reset title since we put the branch name in the titlebar
-  git=$(which git)
-
-  if [ "$1" = "checkout" ]; then
-    $git $@
-    set_title
-  else
-    $git $@
-  fi
-} # git
index 47db2ca..69f8aa1 100644 (file)
@@ -17,21 +17,6 @@ CR=$(echo "\015")
 
 view_name=
 
-function in_git_repo {
-  pwd=$PWD
-  
-  while [ "$pwd" != "/" ]; do
-    if [ -d "$pwd/.git" ]; then
-      true;
-      return;
-    fi
-
-    pwd=$(dirname "$pwd")
-  done
-  
-  false
-} # in_git_repo
-
 # Function to set the title bar. Works on the terminal emulators listed.
 function title_bar {
   prefix="$@"
diff --git a/rc/git b/rc/git
new file mode 100644 (file)
index 0000000..fabea71
--- /dev/null
+++ b/rc/git
@@ -0,0 +1,41 @@
+#!/bin/bash
+################################################################################
+#
+# File:        $RCSfile: git,v $
+# Revision:    $Revision: 1.0 $ 
+# Description: This script set up some useful environment variables and aliases
+#              for git execution. File should be sourced (e.g . git) 
+# Author:      Andrew@DeFaria.com
+# Created:     Thu Nov  7 18:00:34 PST 2013
+# Modified:    $Date: $
+# Language:    bash
+#
+# (c) Copyright 2000-2013, ClearSCM, Inc., all rights reserved.
+#
+################################################################################
+function in_git_repo {
+  pwd=$PWD
+  
+  while [ "$pwd" != "/" ]; do
+    if [ -d "$pwd/.git" ]; then
+      true;
+      return;
+    fi
+
+    pwd=$(dirname "$pwd")
+  done
+  
+  false
+} # in_git_repo
+
+function git () {
+  # Need to reset title since we put the branch name in the titlebar
+  git=$(which git)
+
+  if [ "$1" = "checkout" -o "$1" = "co" ]; then
+    $git $@
+    set_title
+  else
+    $git $@
+  fi
+} # git