Skip to content

Instantly share code, notes, and snippets.

@danog
Last active May 20, 2016 17:29
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save danog/c9e87e7d110acdae6395 to your computer and use it in GitHub Desktop.
Dropbox headless installation script
#!/bin/bash
# Dropbox installation script by Daniil Gentili.
if [ -f ~/.dropbox-dist/dropboxd ]; then echo "Dropbox already installed."; else
echo "Installing Dropbox..."
platform=`uname -m | tr '[A-Z]' '[a-z]'`
case $platform in
"x86_64")
DROPBOXURL="http://www.dropbox.com/download?plat=lnx.x86_64"
;;
*)
DROPBOXURL="http://www.dropbox.com/download?plat=lnx.x86"
;;
esac
cd ~ && wget -O - $DROPBOXURL | tar xzf - && ~/.dropbox-dist/dropboxd && sudo wget -O /usr/bin/dropbox.py https://www.dropbox.com/download?dl=packages/dropbox.py && echo "Dropbox installed successfully." || echo "Couldn't install Dropbox."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment