Changeset 59 for confman/confmanlib.sh
- Timestamp:
- 04/06/2006 20:41:27 (6 years ago)
- File:
-
- 1 edited
-
confman/confmanlib.sh (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
confman/confmanlib.sh
r57 r59 1 #! /usr/local/bin/bash 1 #! /bin/bash 2 # 2 3 # This file provides shell libraries to our configuration management system. 3 4 # It will be sourced by the relevant Rescomp scripts. 4 5 # 6 # Author: Chris Cowart <ccowart@rescomp.berkeley.edu> 7 # Date: 30 March 2006 8 # 5 9 # $Id$ 6 10 … … 120 124 mode=`conf_get_prop ${myfile} mode` 121 125 comment=`conf_get_prop ${myfile} comment` 122 msg="This portion controlled under the ${layer} module."123 echo "${comment} $msg" >> $tmpfile124 126 cat $livepart >> $tmpfile 125 127 sudo rm $livepart … … 209 211 local myfile="${WORK_PATH}/${module}${file}" 210 212 local warning="${comment} ${CONF_WARNING}" 213 local morewarn="${comment} Managed under ${module} module." 211 214 local revision="${comment} \$Id\$" 212 215 echo $file 213 216 214 217 if [ -z $usefile ] ; then 215 echo -e "${warning}\n${revision}\n" > $myfile 216 elif head -n 1 ${file%-${module}} | grep '^#!' >/dev/null ; then 217 awk "{ if (NR==2) print \"\\n${warning}\\n${revision}\\n\"\$0; 218 else print \$0 }" ${file%-${module}} > $myfile 218 echo -e "${warning}\n${morewarn}\n${revision}\n" > $myfile 219 elif head -n 1 ${usefile} | grep '^#!' >/dev/null ; then 220 awk "{if (NR==2) 221 print \"\\n${warning}\\n${morewarn}\\n${revision}\\n\"\$0; 222 else print \$0 }" ${usefile} > $myfile 219 223 else 220 echo -e "${warning}\n${ revision}\n" > $myfile221 cat ${ file%-${module}} >> $myfile224 echo -e "${warning}\n${morewarn}\n${revision}\n" > $myfile 225 cat ${usefile} >> $myfile 222 226 fi 223 227
Note: See TracChangeset
for help on using the changeset viewer.
