Create a gist now

Instantly share code, notes, and snippets.

Sync SoundCloud.app's playlists over Dropbox.
# Enable SoundCloud.app to sync its playlists over DropBox.
# You'll have to launch it on every computers you want to sync together.
# 1. Download the script.
# 2. Edit the SC_DROPBOX_PATH variable if your DropBox folder is not located inside your home folder.
# 3. Lauch Terminal.app.
# 4. Browse to the directory where the script is located: `cd /path/to/folder`
# 5. Make the script executable: `chmod +x sc_sync.sh`
# 6. Launch the script: `./sc_sync.sh`
# Edit the variable below if your DropBox folder isn't located inside your home folder.
# Don't forget to escape spaces and remove the trailing slash.
SC_DROPBOX_PATH=~/DropBox/SoundCloud
SC_ORIG_PATH=~/Library/Application\ Support/SoundCloud
echo "Enabling SoundCloud's playlists sync over DropBox"
echo ""
if [ ! -d "$SC_DROPBOX_PATH" ]
then
echo "Directory $SC_DROPBOX_PATH doesn't exists, moving the original directory..."
mv "$SC_ORIG_PATH" "$SC_DROPBOX_PATH"
else
echo "Directory $SC_DROPBOX_PATH already exists, backuping the original directory..."
if [ -d "$SC_ORIG_PATH.bak" ]
then
echo "Removing the old backup..."
rm -rf "$SC_ORIG_PATH.bak"
fi
mv "$SC_ORIG_PATH" "$SC_ORIG_PATH.bak"
fi
echo "Creating the symlink from $SC_ORIG_PATH to $SC_DROPBOX_PATH..."
ln -s "$SC_DROPBOX_PATH" "$SC_ORIG_PATH"
echo "Done."
echo ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment