BuildCubeE/MPW-3.2.3/Scripts/TransferCKID
2019-01-13 15:57:32 +08:00

38 lines
703 B
Plaintext

# TransferCkid - Move the ckid resource from fromFile to toFile.
#
# Usage: TransferCKID fromFile toFile
#
# TransferCKID moves the ckid resource (if it exists) from the
# first file to the second file.
#
# © Apple Computer, Inc. 1988 - 1990
# All rights reserved.
Set Exit 0
# Check the parameters
If {#} ≠ 2
Echo "### Usage - {0} fromFile toFile" > dev:stderr
Exit 1
End
# Check if files exist
For name in "{1}" "{2}"
If "`Exists -f "{name}"`"==""
Echo "### {0}" - File "'{name}'" does not exist. > dev:stderr
Exit 2
End
End
Begin
# Transfer the ckid
Echo "Include ∂"{1}∂" 'ckid';" | Rez -m -a -o "{2}"
If {Status} == 0
Echo "Delete 'ckid';" | Rez -a -o "{1}"
End
End