[OT] Script help to determine Adobe Acrobat Pro version

jwojda
Valued Contributor II

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

2 ACCEPTED SOLUTIONS

thoule
Valued Contributor II

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"
~~

View solution in original post

sean
Valued Contributor

This perhaps:

#!/bin/bash

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

exit 0

View solution in original post

4 REPLIES 4

thoule
Valued Contributor II

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"
~~

sean
Valued Contributor

This perhaps:

#!/bin/bash

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

exit 0

thoule
Valued Contributor II

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

jwojda
Valued Contributor II

thanks guys! That worked!