Jim Gifford wrote:
I also noticed that LLH moves things from asm-generic and incorporates them into asm-{arch}, so that kinda of throws things off a little.
I have an idea about this too. This may not be portable because of the math, not sure:
cd asm-${arch} # find files that contain '<asm-generic' and get rid of the '#include ' # to make a colon (:) separated list with line number for combine in $(grep -nr "<asm-generic" * | sed '[EMAIL PROTECTED] @@') do # Assign each variable by the previous output file=$(echo "$combine" | cut -d: -f1) line=$(echo "$combine" | cut -d: -f2) include=$(echo "$combine" | cut -d: -f3 | sed 's@<@@' | sed 's@>@@') # eline or end line will be passed to head eline=$(( $line - 1 )) # determine the length of the file length=$(grep -c '^' $file) # sline or start line will be passed to tail sline=$(( $length - $line )) # backup mv $file ${file}-orig # create new file from old line before asm-generic include head -n $eline ${file}-orig > $file # add contents of asm-generic header to new file cat ../$include >> $file # add remaining parts, minus the include line, from original file tail -n $sline ${file}-orig >> $file rm ${file}-orig done -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page