Initial add of defaria.com
[clearscm.git] / defaria.com / Computers / code / adm / bin / root
1 #!/bin/bash
2 ################################################################################
3 #
4 # File:         root
5 # Description:  A script to go into "wizard" mode
6 # Author:       Andrew@DeFaria.com
7 # Created:      Mon May 17 07:35:59 PDT 1999
8 # Language:     Korn shell
9 #
10 # (c) Copyright 1999, Andrew DeFaria, all rights reserved.
11 #
12 ################################################################################
13 me=$(basename $0)
14 sudo=~v801310/adm/sudo/bin/sudo
15
16 if [ ! -x "$sudo" ]; then
17   print -u2 "$me: Warning: Unable to find sudo!"
18   exit 1
19 fi
20
21 if [ $# -gt 0 ]; then
22   # Execute the commands
23   $sudo $@ 
24 else
25   # Become a "wizard"!
26   $sudo
27
28   if [ -x ~/.rc/functions ]; then
29     # Source in ksh functions (needed for set_title and set_prompt)
30     . ~/.rc/functions
31     # Reset title and prompt (if you can)
32     alias ct=/usr/atria/bin/cleartool
33     set_title
34     set_prompt
35   fi
36 fi