Changeset 76 for confman/confmanlib.sh


Ignore:
Timestamp:
04/14/2006 19:17:22 (6 years ago)
Author:
ccowart
Message:

Coded the install function for installing a single file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • confman/confmanlib.sh

    r68 r76  
    9595          $cmd 
    9696  done 
    97   for file in $SINGULARITIES ; do 
    98           conf_assemble_sing ${module} ${file} 
    99   done 
    10097  # This is a hack to work around NFS home dirs, for now: 
    10198  chmod o-rx ${WORK_PATH} 
    10299} 
     100 
     101function conf_install { 
     102  local module="$1" 
     103  local file="$2" 
     104  local moduledir="${WORK_PATH}/$module" 
     105  local livefile=`echo "$file" | sed -E "s:${WORK_PATH}/[^/]+::"` 
     106 
     107  # See if it even exists 
     108  file="${moduledir}${livefile}" 
     109  if [ ! -f $file ] ; then 
     110          return 0 
     111  fi 
     112 
     113  # If we got here, figure it out 
     114  local owner=`conf_get_prop ${file} owner` 
     115  local group=`conf_get_prop ${file} group` 
     116  local mode=`conf_get_prop ${file} mode` 
     117  local opts="-Sp -o $owner -g $group -m $mode" 
     118  local cmd="sudo install $opts $file ${LIVE_ROOT}$livefile" 
     119 
     120  chmod o+rx ${WORK_PATH} 
     121  echo $cmd 
     122  $cmd 
     123  chmod o-rx ${WORK_PATH} 
     124} 
     125 
    103126 
    104127function conf_list { 
Note: See TracChangeset for help on using the changeset viewer.