c6d5bc19cc9457f7d0a189fadc68e3527eb0f2fe
[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 ulw=/usr/local/cp-monitoring-whm-plugin
32 export CPANEL_TEAM='scrum'
33
34 #alias ulc="cd /usr/local/cpanel"
35 alias perl="$ulc/3rdparty/bin/perl"
36
37 # Unset PERLTIDY and PERLCRITIC as those variable override looking for
38 # ~/.perltidyrc and ~/.perlcriticrc.
39 unset PERLTIDY
40 unset PERLCRITIC
41
42 # This is the completer function for ulc. This completes any path that comes
43 # after the ulc as a path completion relative to $ulc
44 function _ulc {
45   local cur prev
46
47   COMPREPLY=()
48   cur="${COMP_WORDS[COMP_CWORD]}"
49   prev="${COMP_WORDS[COMP_CWORD-1]}"
50
51   # to be continued
52 } # _ulc
53
54 function ulc {
55   path=$1
56
57   if [ -s "$1" ]; then
58     cd $ulc/$path
59   else
60     cd $ulc
61   fi
62 } # ulc
63
64 function ulp {
65   path=$1
66
67   if [ -s "$1" ]; then
68     cd $ulp/$path
69   else
70     cd $ulp
71   fi
72 } # ulp
73
74
75 function ulw {
76   path=$1
77
78   if [ -s "$1" ]; then
79     cd $ulw/$path
80   else
81     cd $ulw
82   fi
83 } # ulw
84