Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- if [ -z $1 ] || [ -z $2 ] || [ -z $3 ] ; then
- echo 'Usage: ./btsync_create_deb.sh <btsync_version> <debian_arch> <deb_packet_version>'
- exit 1
- fi
- BT_VERSION=$1
- DEB_ARCH=$2
- DEB_PACKET_VERSION=$3
- case $DEB_ARCH in
- amd64)
- BT_ARCH="x64"
- ;;
- i386)
- BT_ARCH="i386"
- ;;
- esac
- DEB_VERSION=$BT_VERSION"-"$DEB_PACKET_VERSION"_"$DEB_ARCH
- DEB_PACKET_NAME="btsync_"$DEB_VERSION".deb"
- DISTR_NAME="btsync_"$BT_ARCH"-"$BT_VERSION
- DISTR_FILE=$DISTR_NAME".tar.gz"
- DISTR_LINK="http://download-lb.utorrent.com/endpoint/btsync/os/linux-i386/track/stable"
- #download btsync
- wget $DISTR_LINK
- tar xzvf $DISTR_FILE
- DEB_DISTR_NAME="btsync_"$DEB_VERSION
- mkdir $DEB_DISTR_NAME
- mkdir -p $DEB_DISTR_NAME"/usr/bin"
- cp btsync $DEB_DISTR_NAME"/usr/bin"
- mkdir -p $DEB_DISTR_NAME"/usr/share/doc/btsync"
- cp LICENSE.TXT $DEB_DISTR_NAME"/usr/share/doc/btsync"
- mkdir $DEB_DISTR_NAME"/DEBIAN"
- cat <<EOF > $DEB_DISTR_NAME"/DEBIAN/control"
- Package: btsync
- Source: btsync
- Version: $BT_VERSION
- Architecture: $DEB_ARCH
- Maintainer: Dmitry Yudin <public@akademic.name>
- Section: net
- Priority: optional
- Homepage: http://labs.bittorrent.com/experiments/sync.html
- Description: BitTorrent Sync synchronizes your files using a peer-to-peer (P2P) protocol.
- This protocol is very effective for transferring large files across multiple devices, and is very similar to the powerful protocol used by applications like µTorrent and BitTorrent.
- The data is transferred in pieces from each of the syncing devices, and BitTorrent Sync chooses the optimal algorithm to make sure you have a maximum download and upload speed during the process.
- EOF
- dpkg -b $DEB_DISTR_NAME
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement