#!/usr/bin/perl # Dino 10.12.2008 # Check and continue iff Office 2008 (aka Office 12) is installed. use strict; use integer; no utf8; use warnings; # 1) check if Office 2008 is on this volume my @office; $office[0] = "/Applications/Microsoft Office 2008"; $office[1] = "/Applications/Microsoft Office 12"; my $out = 48; # error code for my $o (@office) { $out = 0 if -e $ARGV[0].$o } exit $out if $out; # 2) check for profing tools directory my @dirs = ( "/Applications/Microsoft Office 2008/Office/Shared applications/Proofing tools", "/Applications/Microsoft Office 2008/Office/Gedeelde toepassingen/Taalprogramma's", "/Applications/Microsoft Office 2008/Office/Gemeinsame Anwendungen/Korrekturhilfen", "/Applications/Microsoft Office 2008/Office/Aplicaciones compartidas/Herramientas de correccio\314\201n", "/Applications/Microsoft Office 2008/Office/Applications partage\314\201es/Outils de ve\314\201rification", "/Applications/Microsoft Office 2008/Office/Applicazioni condivise/Strumenti di correzione", "/Applications/Microsoft Office 2008/Office/Delade program/Spra\314\212kverktyg", "/Applications/Microsoft Office 12/Office/Shared applications/Proofing tools", "/Applications/Microsoft Office 12/Office/Gedeelde toepassingen/Taalprogramma's", "/Applications/Microsoft Office 12/Office/Gemeinsame Anwendungen/Korrekturhilfen", "/Applications/Microsoft Office 12/Office/Aplicaciones compartidas/Herramientas de correccio\314\201n", "/Applications/Microsoft Office 12/Office/Applications partage\314\201es/Outils de ve\314\201rification", "/Applications/Microsoft Office 12/Office/Applicazioni condivise/Strumenti di correzione", "/Applications/Microsoft Office 12/Office/Delade program/Spra\314\212kverktyg" ); $out = 49; # error code for my $d (@dirs) { $out = 0 if -e $ARGV[0].$d } exit $out if $out; # 3) ok #print "EVerything ok - $out.\n"; exit $out;