Last active
December 21, 2015 02:29
-
-
Save brenolf/6235673 to your computer and use it in GitHub Desktop.
Bash script to install Copy on Ubuntu-like OS globally.
It accepts one single optional parameter "-nd" which tells the script to not download the file.
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 | |
# Created by Breno Lima de Freitas - 2013 | |
# based on <http://forums.linuxmint.com/viewtopic.php?f=47&t=130343> | |
# The script accepts one single optional parameter (-nd). This pa- | |
# rameter tells the script to not download the file. | |
if [ "$1" != "-nd" ]; then | |
wget https://copy.com/install/linux/Copy.tgz -O /tmp/copy.tgz | |
fi | |
tar -zxf /tmp/copy.tgz -C /tmp/ | |
rm /tmp/copy.tgz | |
ARC=$(uname -i) | |
if [ "$ARC" = "x86_64" ]; then | |
mv /tmp/copy/x86_64 /opt/copy | |
else | |
mv /tmp/copy/x86 /opt/copy | |
fi | |
rm -rf /tmp/copy | |
wget https://www.copy.com/include/images/images-std/about-copycrane.png -O /opt/copy/logo.png | |
ln -s /opt/copy/CopyAgent /usr/bin/copy_agent | |
ENTRY=/usr/share/applications/copy.desktop | |
touch $ENTRY | |
echo '[Desktop Entry] | |
Name=Copy | |
GenericName=File Synchronizer | |
Comment=Sync your files across computers and to the web | |
Exec=copy_agent | |
Terminal=false | |
Type=Application | |
Icon=/opt/copy/logo.png | |
Categories=Network;FileTransfer; | |
StartupNotify=false' > $ENTRY |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment