Magellan Linux

Diff of /trunk/mage/usr/lib/mage/env-rebuild.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 259 by niro, Tue Oct 4 15:07:47 2005 UTC revision 456 by niro, Sun Apr 1 01:26:34 2007 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/sh
2    
3  # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/env-rebuild.sh,v 1.9 2005-10-04 15:07:47 niro Exp $  # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/env-rebuild.sh,v 1.12 2007-04-01 01:26:34 niro Exp $
4  #  #
5  # rebuilds /etc/{ld.so.conf,profile.env} with given files from /etc/env.d  # rebuilds /etc/{ld.so.conf,profile.env} with given files from /etc/env.d
6  #  #
# Line 25  then Line 25  then
25   TMPDIR="$(/bin/mktemp -d -p /var/tmp)"   TMPDIR="$(/bin/mktemp -d -p /var/tmp)"
26  else  else
27   TMPDIR="/var/tmp/tmp.$$"   TMPDIR="/var/tmp/tmp.$$"
28     install -d ${TMPDIR}
29  fi  fi
30    
31  echo -en "\n>>>> Rebuilding environment... "  echo -en "\n>>>> Rebuilding environment... "
# Line 37  echo -en "\n>>>> Rebuilding environment. Line 38  echo -en "\n>>>> Rebuilding environment.
38  for file in ${P}/etc/env.d/*  for file in ${P}/etc/env.d/*
39  do  do
40   # abort if "empty"   # abort if "empty"
41   [[ ${file} = ${P}/etc/env.d/* ]] && continue   [[ ${file} = ${P}/etc/env.d/\* ]] && continue
42    
43   # reads content of every file   # reads content of every file
44   while read path   while read path
45   do   do
46   # abort if empty   # abort if empty or an comment
47   [[ -z ${path} ]] && continue   case "${path}" in
48     \#*|"") continue ;;
49     esac
50    
51   # writes LDPATH to ${P}/etc/ld.so.conf,   # writes LDPATH to ${P}/etc/ld.so.conf,
52   # anything else to ${P}/etc/profile.env   # anything else to ${P}/etc/profile.env

Legend:
Removed from v.259  
changed lines
  Added in v.456