Skip to content

Instantly share code, notes, and snippets.

@saml
Created March 16, 2012 02:11
Show Gist options
  • Save saml/2048137 to your computer and use it in GitHub Desktop.
Save saml/2048137 to your computer and use it in GitHub Desktop.
#!/bin/bash
if (( $# < 1 ))
then
echo "Usage: $0 path-to-add"
exit 1
fi
abspath="$(dirname "$1")/$(basename "$1")"
relpath="${abspath##$HOME}"
echo ln -s "$abspath" "$HOME/Dropbox$HOME$relpath"
ln -s "$abspath" "$HOME/Dropbox$HOME$relpath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment