Results 1 to 2 of 2
Hello-
I'm trying to develop the ability to do command line program migrations in Mac OS X. I would like to be able to read a file, in this case ...
- 05-20-2007 #1Just Joined!
- Join Date
- May 2007
- Posts
- 15
Command Line Migration Assistant
Hello-
I'm trying to develop the ability to do command line program migrations in Mac OS X. I would like to be able to read a file, in this case Mail.pkg, and have a script that copies the application and any support files elsewhere on the drive to another computer.
I think the syntax should be something like:
And then the command line:Code:#!/bin/sh for file in `lsbom $1/Contents/Archive.bom` do cp "$file" "$2" done
I need someway to tell my script to copy the file and the directories it should be in without overwriting possible existing directories. I thought that was -R, but when I use -R I get all of the files in the root directory. I'm trying to copy a program and all of its required resources from someone's old computer to their new computer - like Migration Assistant in OS X. I know there is an easy way to make this happen on the command line.Code:$ sh script.sh /Library/Reciepts/Mail.pkg /Volumes/OtherHDD
Any help would be greatly appreciated! Thank you for your time.
-= robbie =-
- 05-20-2007 #2
I think raising the -i flag on your cp command does what you need.


Reply With Quote