More cPanel specific changes
[clearscm.git] / rc / client_scripts / cPanel
1 #!/bin/bash
2 ################################################################################
3 #
4 # File:         $RCSfile: Audience,v $
5 # Revision:     $Revision: 1.0 $
6 # Description:  Client specific start up for Audience
7 # Author:       Andrew@ClearSCM.com
8 # Created:      Fri Nov  8 13:50:01 PST 2013
9 # Modified:     $Date: $
10 # Language:     bash
11 #
12 # (c) Copyright 2013, ClearSCM, Inc., all rights reserved.
13 #
14 ################################################################################
15 append_to_path /usr/local/cpanel/3rdparty/lib/path-bin
16 append_to_path /usr/local/cpanel/3rdparty/bin
17 append_to_path /usr/local/cpanel/build-tools
18 append_to_path /usr/local/sbin
19 append_to_path /usr/local/bin
20 append_to_path /usr/sbin
21 append_to_path /opt/cpanel/composer/bin
22 append_to_path /opt/cplint/bin
23 append_to_path /root/bin
24
25 export CDPATH=/usr/local
26 export ulc=/usr/local/cpanel
27 export CPANEL_TEAM='scrum'
28
29 #alias ulc="cd /usr/local/cpanel"
30 alias cperl="$ulc/3rdparty/bin/perl"
31
32 # Unset PERLTIDY and PERLCRITIC as those variable override looking for
33 # ~/.perltidyrc and ~/.perlcriticrc.
34 unset PERLTIDY
35 unset PERLCRITIC
36
37 # This is the completer function for ulc. This completes any path that comes
38 # after the ulc as a path completion relative to $ulc
39 function _ulc {
40   local cur prev
41
42   COMPREPLY=()
43   cur="${COMP_WORDS[COMP_CWORD]}"
44   prev="${COMP_WORDS[COMP_CWORD-1]}"
45
46   # to be continued
47 } # _ulc
48
49 function ulc {
50   path=$1
51
52   if [ -s "$1" ]; then
53     cd $ulc/$path
54   else
55     cd $ulc
56   fi
57 } # ulc