Skip to main content
Solved

[OT] Script help to determine Adobe Acrobat Pro version

  • January 12, 2016
  • 4 replies
  • 32 views

ImAMacGuy
Forum|alt.badge.img+23

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

Best answer by thoule

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

4 replies

Forum|alt.badge.img+15
  • Contributor
  • Answer
  • January 12, 2016

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

Forum|alt.badge.img+12
  • Contributor
  • January 12, 2016

This perhaps:

#!/bin/bash

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

exit 0

Forum|alt.badge.img+15
  • Contributor
  • January 12, 2016

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


ImAMacGuy
Forum|alt.badge.img+23
  • Author
  • Esteemed Contributor
  • January 12, 2016

thanks guys! That worked!