Removed /usr/local from CDPATH
[clearscm.git] / functions / utils
1 #!/bin/ksh
2 ################################################################################
3 #
4 # File:         utils
5 # Description:  Miscellanous utility functions for Korn Shell Scripts
6 # Author:       Andrew@DeFaria.com
7 # Created:      Tue Apr 15 14:20:02 PDT 1997
8 # Modified:
9 # Language:     Korn Shell
10 #
11 # (c) Copyright 2001, Andrew@DeFaria.com, all rights reserved
12 #
13 ################################################################################
14 if [ -x /usr/xpg4/bin/id ]; then
15   ID=/usr/xpg4/bin/id
16 else
17   ID=/usr/bin/id
18 fi
19
20 function is_root {
21   if [ $($ID -u) -eq 0 ]; then
22     return 0
23   else
24     return 1
25   fi
26 } # is_root
27
28 function is_not_root {
29   if [ $($ID -u) -eq 0 ]; then
30     return 1
31   else
32     return 0
33   fi
34 } # is_not_root