home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NeXTSTEP 4.0 PR1
/
NeXT_NEXTSTEP_4.0_PR1_(beta).rar
/
Openstep4-Pr1User.iso
/
Upgrader.app
/
Default.upgrade
/
PreProcess
< prev
next >
Wrap
Text File
|
1994-10-26
|
2KB
|
66 lines
#!/bin/csh -f
#
# Upgrader pre-processing script.
set path = (/bin /usr/bin /etc /usr/etc /usr/ucb)
unalias *
if ($#argv != 2) then
echo "Usage: PreProcess targroot sourceroot"
exit 1
endif
set target = $argv[1]
set source = $argv[2]
echo Preparing $target for upgrade at `date` ...
# execute local preprocessing script
set localscript = ${source}/usr/local/Upgrade/PreProcess
if ( -x ${localscript} ) then
${localscript} ${target} ${source} || exit 1
endif
# Pre-remove compressed languages to try and free up as much space as possible.
foreach language (French German Italian Swedish Spanish English)
set statusfile = ${target}/NextLibrary/Receipts/${language}.pkg/${language}.status
if (-f $statusfile) then
if (`/bin/cat $statusfile` == "compressed") then
echo Removing files for ${language}, which was never used...
/bin/rm -rf ${target}/NextLibrary/Receipts/${language}.pkg
endif
endif
end
# Grab list of drivers supplied with the system.
/bin/rm -f ${target}/private/tmp/DriverList
${source}/usr/etc/lsbom -s ${target}/usr/lib/NextStep/BaseSystem.bom | egrep '\.config$' | sort > ${target}/private/tmp/DriverList
# Copy driver instances.
set arch=`/usr/bin/arch`
set oldDrivers=${target}/private/tmp/oldDrivers
if (-d ${target}/private/Drivers/${arch}) then
/bin/rm -rf ${oldDrivers}
/bin/mkdir ${oldDrivers}
set olddir=`/bin/pwd`
cd ${target}/private/Drivers/${arch}
/usr/bin/find . \( -name \*.table -o -name \*.strings -o -name \*.modes -o -name \*.custom \) -print | /usr/bin/cpio -pd ${oldDrivers}
cd ${olddir}
endif
# Remove boms if left over from previous upgrade attempt
/bin/rm -rf ${target}/UpdatedBoms.old
if (-d ${target}/UpdatedBoms) then
/bin/mv ${target}/UpdatedBoms ${target}/UpdatedBoms.old
endif
# Move old updated files out of the way
/bin/rm -rf ${target}/UpdatedFiles.old
if (-d ${target}/UpdatedFiles) then
/bin/mv ${target}/UpdatedFiles ${target}/UpdatedFiles.old
endif
echo Upgrade preparation completed at `date`.
echo ""
exit 0