script and log file

Posted:
in Mac Software edited January 2014
Hello everyone, I've written a script that installs 2 packages et copies 2 files.

It works fine but for some clients (all they have Mac OS 10.5.4 Leopard), a problem is hapenend when installaing a package on /Applications. (I'm not sure at 100% but it most problable after many investigations).

Code:


echo installation Firebird

sudo installer -pkg /Autonome/FirebirdSS-1.5.5-4926-powerpc.pkg -target /



echo "Copie des fichiers necessaires pour l'application (Conf et UDF)"

cp /Autonome/FreeAdhocUDF /Library/Frameworks/Firebird.framework/Versions/A/Resources/English.lproj/var

cp -f /Autonome/firebird.conf /Library/Frameworks/Firebird.framework/Versions/A/Resources/English.lproj/var



echo installation Autonome

sudo installer -pkg /Autonome/ClientTheriaqueAutonome.pkg -target /Applications/ClientTheriaqueAutonome



echo suppression des fichiers temporaires

rm -rf /Autonome

rm /Applications/ClientTheriaqueAutonome/LiveUpdate/Test.xml









Can anyone tell me if

1. /Applications path has some properties in this Mac version

2. My script syntax is correct or not

3. If I can add a log file to know the source of the problem. I yes how I must to add to know if the command was terminated fine or not. If not how to write in a log file.



Thank you in advance for your help and collabration

Best regards.

Comments

  • Reply 1 of 1
    MarvinMarvin Posts: 14,195moderator
    The shell script echos should go into your console log by default. If you go to /Applications/utilities/and open console.app, you should see where the last echo statement reached.



    Possibly the cp to the Firebird framework won't work if a user is not logged in as an admin user as they might not have write permissions. Changing to sudo cp should work if that's the case.



    I'm not sure what Autonome is - some patch your are adding to Firebird. How can you ensure that they extract the package to the root? If you distribute the patch on a dmg, the path will always be /Volumes/Autonome... assuming you call the dmg Autonome.
Sign In or Register to comment.