Author [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: Made a bash script for easy upgrading of binaries in Ubuntu  (Read 252 times)

Offline VoR0220

Made a bash script for easy upgrading of binaries in Ubuntu
« on: February 13, 2015, 07:49:56 PM »

Hey guys. Nothing fancy. I just took what you guys already had and compacted it into a single command line run to upgrade ubuntu binaries in a bash script. Sent the pull request up to the github. Here's the code:

Code: [Select]
#!/bin/bash
# A short little script to help with the annoyance of upgrading bitshares in a Linux Distro

if [ -z "$1" ]; then    #if no command line arguments inputted, ask user for version they'd like
  echo -n "What version of BitShares would you like?: "
  read version
fi

# env -i git pull
# ^ this was in the original documentation...but I don't know why


# Checkout a certain version ... bts/VERSIONNUMBER !! modify accordingly
env -i git checkout bts/$version
env -i git submodule update

# Compile
make
make forcebuildweb || exit
make BitShares     || exit

## Install Binaries system-wide
cp programs/qt_wallet/bin/BitShares /usr/local/bin/
mkdir -p /usr/local/share/icons/
cp programs/qt_wallet/images/qtapp80.png /usr/local/share/icons/BitShares.png
cp programs/qt_wallet/BitShares.desktop /usr/local/share/applications/

exit

Command to run it is:

sudo bitshares-upgrade [version]

if you do not give a version number it will request it from you. Let me know what you think.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline santaclause102

  • Hero Member
  • *****
  • Posts: 2480
    • View Profile
Re: Made a bash script for easy upgrading of binaries in Ubuntu
« Reply #1 on: February 13, 2015, 07:52:27 PM »
I find that very helpful, thanks a lot! Will test over the next days.

Offline VoR0220

Re: Made a bash script for easy upgrading of binaries in Ubuntu
« Reply #2 on: February 13, 2015, 08:09:18 PM »
don't forget to chmod so that you have permission to run it :)
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 11959
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BTS: xeroc
  • GitHub: xeroc
Re: Made a bash script for easy upgrading of binaries in Ubuntu
« Reply #3 on: February 14, 2015, 12:33:28 PM »
This gives you the latest version number in "bts/" tags!
Code: [Select]
$ git tag --sort=version:refname | grep "bts/" | tail -n1 | awk -F"/" '{print $2}'
0.6.1

also note that I added a new issue on github to ask for a "make install" feature in the makefiles ..

+5% .. keep up the food work!
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline VoR0220

Re: Made a bash script for easy upgrading of binaries in Ubuntu
« Reply #4 on: February 15, 2015, 11:50:43 PM »
good idea. A script to just update to the latest issue. Will put that in.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

 

Google+