Copy.com agent latest version script
Posted: 26 Oct 2013, 21:27
Copy this text into a text file and save it. Make sure you are connected to the net. Run the script: sh /path/to/my/file.sh
The final porteus module will be created in /tmp. This will create the latest version available. The script will create a module relevant to your architecture (32 or 64 bit)
#!/bin/bash
# Script to build the copy agent for copy.com on Porteus linux
link=https://copy.com/install/linux/Copy.tgz
uname -m|grep 64 && arch=x86_64 || arch=x86
cd /tmp
mkdir -p /tmp/copybuild/{usr/share/applications,usr/local/bin,usr/share/pixmaps}
echo "Downloading source ..."
if [ ! -f Copy.tgz ]; then wget --no-check-certificate $link; fi
wget --no-check-certificate --trust-server-names https://dl.dropboxusercontent.com/u/686 ... ycrane.png -P /tmp/copybuild/usr/share/pixmaps/
echo "Unpacking source ..."
tar xf Copy.tgz
echo "Copying source files"
cp -a copy/$arch/* /tmp/copybuild/usr/local/bin/
cat >> /tmp/copybuild/usr/share/applications/copyagent.desktop << EOF
[Desktop Entry]
Name=copy.comagent
Comment=Agent to sync with copy.com storage
Exec=/usr/local/bin/CopyAgent
Terminal=false
Icon=/usr/share/pixmaps/copycrane.png
Type=Application
Categories=System;Desktop;
Version=1.0
EOF
echo
echo "Creating final module ..."
dir2xzm /tmp/copybuild /tmp/copy-agent.xzm
The final porteus module will be created in /tmp. This will create the latest version available. The script will create a module relevant to your architecture (32 or 64 bit)
#!/bin/bash
# Script to build the copy agent for copy.com on Porteus linux
link=https://copy.com/install/linux/Copy.tgz
uname -m|grep 64 && arch=x86_64 || arch=x86
cd /tmp
mkdir -p /tmp/copybuild/{usr/share/applications,usr/local/bin,usr/share/pixmaps}
echo "Downloading source ..."
if [ ! -f Copy.tgz ]; then wget --no-check-certificate $link; fi
wget --no-check-certificate --trust-server-names https://dl.dropboxusercontent.com/u/686 ... ycrane.png -P /tmp/copybuild/usr/share/pixmaps/
echo "Unpacking source ..."
tar xf Copy.tgz
echo "Copying source files"
cp -a copy/$arch/* /tmp/copybuild/usr/local/bin/
cat >> /tmp/copybuild/usr/share/applications/copyagent.desktop << EOF
[Desktop Entry]
Name=copy.comagent
Comment=Agent to sync with copy.com storage
Exec=/usr/local/bin/CopyAgent
Terminal=false
Icon=/usr/share/pixmaps/copycrane.png
Type=Application
Categories=System;Desktop;
Version=1.0
EOF
echo
echo "Creating final module ..."
dir2xzm /tmp/copybuild /tmp/copy-agent.xzm