views:

573

answers:

1

I would like to share my Oracle SQL Developer configuration across my several computers that use Dropbox.

How can I do this?

A: 

Here's what I did.

#!/bin/bash

# share sqldeveloper config via dropbox
# this is for sqldeveloper 1.5.4, change your paths as necessary
# strace or dtruss sqldeveloper to see what config files are accessed

ITEMS="
o.ide.11.1.1.0.22.49.48/preferences.xml
o.ide.11.1.1.0.22.49.48/settings.xml
o.jdeveloper.cvs.11.1.1.0.22.49.48/preferences.xml
o.jdeveloper.subversion.11.1.1.0.22.49.48/preferences.xml
o.jdeveloper.vcs.11.1.1.0.22.49.48/preferences.xml
o.sqldeveloper.11.1.1.59.40/preferences.xml
o.sqldeveloper.11.1.1.59.40/product-preferences.xml
"

INST=~/Library/Application\ Support/SQL\ Developer/system1.5.4.59.40
DROP=~/Dropbox/Library/SQL\ Developer/system1.5.4.59.40

# note, you can zap your configuration if you are not careful.
# remove these exit lines when you're sure you understand what's
# going on.

exit

# copy from real folder to dropbox
for i in $ITEMS; do
    echo uncomment to do this once to bootstrap your dropbox
    #mkdir -p "`dirname "$DROP/$i":`"
    #cp -p "$INST/$i" "$DROP/$i"
done

exit

# link from dropbox to real folder
for i in $ITEMS; do
    rm "$INST/$i"
    ln -s "$DROP/$i" "$INST/$i"
done
Mark Harrison