#!/bin/tcsh -f # # # Save the symbols # # # Unset any symbols set to "" # # echo "" > ${tmpfile} set num = 1 while (${num} <= ${#symbols}) set symbol = "${symbols[${num}]}" @ num = ${num} + 1 if (${symbols[${num}]} != 0 && \ ${symbols[${num}]} != 4) then cat >> ${tmpfile} << eof if (\${?${symbol}}) then if ("\${${symbol}}" == "") then unset ${symbol} endif endif eof endif @ num = ${num} + 1 end source ${tmpfile} rm -f ${tmpfile} # # # Copy the symbols file # # cp symbols ${tmpfile}.symbols # # # Save individual symbols # # set num = 1 while (${num} <= ${#symbols}) set symbol = "${symbols[${num}]}" @ numm = ${num} + 1 @ num = ${num} + 2 if (${symbols[${numm}]} == 0 || \ ${symbols[${numm}]} == 4) continue # # # Copy the value of "symbol" into "value" # # cat > ${tmpfile} << eof set value = if (\${?${symbol}}) then set numm = 1 while (\${numm} <= \${#${symbol}}) set value = (\${value} 1) @ numm = \${numm} + 1 end set numm = 1 while (\${numm} <= \${#${symbol}}) set value[\${numm}] = \\""\${${symbol}[\${numm}]}"\\" @ numm = \${numm} + 1 end endif eof source ${tmpfile} rm -f ${tmpfile} # # # Update the symbols file # # eval ${cmd}updatesymbols ${tmpfile}.symbols ${symbol} ${value} > ${tmpfile}.newsymbols rm -f ${tmpfile}.symbols mv -f ${tmpfile}.newsymbols ${tmpfile}.symbols # # end # # # Replace the original file # # rm -f symbols mv -f ${tmpfile}.symbols symbols # # # Save the updated file # # if (${?outputroot}) then if (-e ${outputroot}.symbols) then rm -f ${outputroot}.symbols endif cp symbols ${outputroot}.symbols endif # # #