Author Topic: Made a bash script for easy upgrading of binaries in Ubuntu  (Read 2178 times)

0 Members and 1 Guest are viewing this topic.

Offline VoR0220

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

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
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!

Offline VoR0220

don't forget to chmod so that you have permission to run it :)
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline santaclause102

  • Hero Member
  • *****
  • Posts: 2486
    • View Profile
I find that very helpful, thanks a lot! Will test over the next days.

Offline VoR0220

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