Skip to main content

I need to write a script that will detect the currently installed acrobat pro version and do a ln -s on it...



I have part of it hard coded so I could test it, but I need it to detect the version and plug that info in...



#!/bin/sh

ln -s /Applications/Adobe Acrobat X Pro/Adobe Acrobat Pro.app /private/tmp/acrobatplugin


So far, the app supports these versions, but if the script could just do a general search even for potential future versions that would be awesome.



Adobe Acrobat X Standard or Pro



Adobe Acrobat XI Standard or Pro Including the locally installed Adobe Creative Cloud XI



Adobe Acrobat DC

This is pretty simple so it may will fail if they have more than one version installed or a bunch of other conditions I didn't think of, but it should get you started at least.



~~#!/bin/sh                               
#tmhoule
acrobatDir=`ls -d /Applications/Adobe Acrobat*/`
echo "Dir: $acrobatDir"
acrobatApp=`ls "$acrobatDir" |grep Acrobat |grep -v Uninstall |grep -v Distiller`
echo "app: $acrobatApp"
ln -s "$acrobatDir$acrobatApp" /tmp/acrobatplugin
echo "link made"
~~

This perhaps:



#!/bin/bash

find /Applications -maxdepth 2 -name "Adobe Acrobat*app" -exec ln -s {} /private/tmp/acrobatplugin ;

exit 0

@sean d'oh! yeah- find command is much faster. I always forget to do anything besides 'print' with it.


thanks guys! That worked!


Reply