Posted on 01-12-2016 06:13 AM
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
Solved! Go to Solution.
Posted on 01-12-2016 06:41 AM
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"
~~
Posted on 01-12-2016 08:05 AM
This perhaps:
#!/bin/bash
find /Applications -maxdepth 2 -name "Adobe Acrobat*app" -exec ln -s {} /private/tmp/acrobatplugin ;
exit 0
Posted on 01-12-2016 06:41 AM
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"
~~
Posted on 01-12-2016 08:05 AM
This perhaps:
#!/bin/bash
find /Applications -maxdepth 2 -name "Adobe Acrobat*app" -exec ln -s {} /private/tmp/acrobatplugin ;
exit 0
Posted on 01-12-2016 08:14 AM
@sean d'oh! yeah- find command is much faster. I always forget to do anything besides 'print' with it.
Posted on 01-12-2016 09:55 AM
thanks guys! That worked!