Last active
May 20, 2016 17:29
-
-
Save danog/c9e87e7d110acdae6395 to your computer and use it in GitHub Desktop.
Dropbox headless installation script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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