/[vps]/baselayout-vserver/branches/baselayout-1_12/sbin/env-update.sh
Gentoo

Contents of /baselayout-vserver/branches/baselayout-1_12/sbin/env-update.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 130 - (hide annotations) (download) (as text)
Fri Dec 2 12:08:44 2005 UTC (12 years, 7 months ago) by phreak
File MIME type: text/x-sh
File size: 692 byte(s)
Redoing a clean branch; starting it from scratch
1 phreak 130 #!/bin/bash
2     # Copyright 1999-2004 Gentoo Foundation
3     # Distributed under the terms of the GNU General Public License v2
4    
5     source /sbin/functions.sh || exit 1
6    
7     if [ "${EUID}" -ne 0 ]
8     then
9     eerror "$0: must be root."
10     exit 1
11     fi
12    
13     usage() {
14     echo "usage: env-update.sh
15    
16     note:
17     This utility generates /etc/profile.env and /etc/csh.env
18     from the contents of /etc/env.d/
19     "
20     exit 1
21     }
22    
23     export SVCDIR="${svcdir}"
24    
25     # Only update if files have actually changed
26     if [ "$1" == "-u" ]
27     then
28     is_older_than "${svcdir}/envcache" /etc/env.d && exit 0
29     shift
30     fi
31    
32     if [ "$#" -ne 0 ]
33     then
34     usage
35     else
36     /bin/gawk \
37     -f /lib/rcscripts/awk/functions.awk \
38     -f /lib/rcscripts/awk/genenviron.awk
39     fi
40    
41    
42     # vim:ts=4

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.20