Synchronizing all Adobe settings on multiple Macs

I decided to write a small script to synchronize the settings for any Adobe application (like Photoshop, InDesign or Lightroom) installed on all my Macs. In ~/Library/Preferences are many files for all the Adobe products, which unfortunately are not bundled in a folder like ~/Library/Preferences/Adobe. So I had to write a script which automatically synchronizes all the stuff, when executed frequently.

You need some shared space, for example Dropbox. If you want, you can use it with encfs, as I do. All settings will be copied in the shared directory and all Macs need to have access to it.

Here’s the script:

#!/bin/bash

SHARED_FOLDER="/Users/sebastian/encfsDropbox/!ADOBE SETTINGS"

IFS="
"

# move existing folders and files to shared space and create links
for adobepath in $(find ~/Library/Preferences \(  -type d -or -type f   \) -maxdepth 1 -iname \*Adobe\* )
do
mkdir -p "${SHARED_FOLDER}${adobepath}"
rsync --delete -a "$adobepath" "${SHARED_FOLDER}$(dirname $adobepath)"/
rm -vr "$adobepath"
ln -vs "${SHARED_FOLDER}$adobepath" "$adobepath"
done

# create links for folders and files which are only in the shared folder
for adobepath in $(find "${SHARED_FOLDER}/Users/$(whoami)/Library/Preferences" \(  -type d -or -type f \) -maxdepth 1 -iname \*Adobe\* )
do
SHARED_FOLDER_ESCAPED=$(printf '%q' "$SHARED_FOLDER" | sed 's/\//\\\//g')
if [ ! -L "$(echo "$adobepath" | sed "s/$SHARED_FOLDER_ESCAPED//")" ]
then
ln -vs "${adobepath}" "$(echo "$adobepath" | sed "s/$SHARED_FOLDER_ESCAPED//")"
fi
done

# delete dead links which name contains "adobe"
find  ~/Library/Preferences -maxdepth 1 -ipath *adobe* -type l | while read f; do if [ ! -e "$f" ]; then echo -n "Remove: "; rm -vf "$f"; fi; done

Adobe saves all user dependend preferences either in ~/Library/Application Support or in ~/Library/Preferences. But in the first one there is only the folder named „Adobe“ which can easily be synchronized with unison. The script moves every file/folder of the Preferences-folder whose name contains “adobe” or “Adobe” into the shared folder and places the required symbolic links in the local folder. In order to work on multiple Macs a link will automatically be created for a folder/file which exists only in the shared folder and dead links will be deleted.

The Mac whose settings should be applied to all computers must be synchronized at last.

In the script the Variable SHARED_FOLDER must be set. It has to be an absolute path name, so do not use „~“ to point to the home directory.

Of course, I won’t take responsibility for any kind of problem that might occur.

Have fun!

Downloads

syncAdobe.sh

FAQ:

1) Why don’t I use unison? In contrast to the documentation, unison does not support wildcards in version 2.40.63. My script supports on the other hand does and handles them well, which means it moves new files to the shared folder and creates necessary links itself.

  1. No comments yet.

  1. No trackbacks yet.

 

Durch die weitere Nutzung der Seite stimmst du der Datenschutzerklärung,
dem Haftungsausschluss und der Verwendung von Cookies zu. Weitere Informationen

Die Cookie-Einstellungen auf dieser Website sind auf "Cookies zulassen" eingestellt, um das beste Surferlebnis zu ermöglichen. Wenn du diese Website ohne Änderung der Cookie-Einstellungen verwendest oder auf "Akzeptieren" klickst, erklärst du sich damit einverstanden.

Schließen