More changes for cPanel
[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 prepend_to_path /usr/local/cpanel/build-tools
16 prepend_to_path /usr/local/cpanel/3rdparty/lib/path-bin
17 prepend_to_path /usr/local/cpanel/3rdparty/bin
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 # Intended to be used for root
26 WIZARD="CPanel"
27
28 export CDPATH=/usr/local
29 export ulc=/usr/local/cpanel
30 export ulp=/usr/local/cp-monitoring-cpanel-plugin
31 export CPANEL_TEAM='scrum'
32
33 #alias ulc="cd /usr/local/cpanel"
34 alias cperl="$ulc/3rdparty/bin/perl"
35
36 # Unset PERLTIDY and PERLCRITIC as those variable override looking for
37 # ~/.perltidyrc and ~/.perlcriticrc.
38 unset PERLTIDY
39 unset PERLCRITIC
40
41 # This is the completer function for ulc. This completes any path that comes
42 # after the ulc as a path completion relative to $ulc
43 function _ulc {
44   local cur prev
45
46   COMPREPLY=()
47   cur="${COMP_WORDS[COMP_CWORD]}"
48   prev="${COMP_WORDS[COMP_CWORD-1]}"
49
50   # to be continued
51 } # _ulc
52
53 function ulc {
54   path=$1
55
56   if [ -s "$1" ]; then
57     cd $ulc/$path
58   else
59     cd $ulc
60   fi
61 } # ulc
62
63 function ulp {
64   path=$1
65
66   if [ -s "$1" ]; then
67     cd $ulp/$path
68   else
69     cd $ulp
70   fi
71 } # ulp
72