#!/bin/bash umask 022 #------- # Determine the architecture to select the platform name. #------- xi386="ia32" xi486="ia32" xi586="ia32" xi686="ia32" xsparc="sparc" mach=$( uname -m ) eval 'arch="${x'"${mach}"'}"' if [ -z "${arch}" ]; then echo "Unknown architecture: '${mach}'" exit 1 fi #------- # Compile the three stages of cdinit. #------- for stage in 1 2 3; do for file in cdinit${stage}.c~ cdinit${stage}-${arch}.s cdinit${stage}-${arch}.o cdinit${stage}-${arch}; do if [ -e "${file}" ]; then rm -fv ${file} fi done done f=$( ls -1 | egrep '~$' ) if [ -n "${f}" ]; then rm -fv $f fi