BitShares Forum
Main => Technical Support => Topic started by: VoR0220 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:
#!/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.
-
I find that very helpful, thanks a lot! Will test over the next days.
-
don't forget to chmod so that you have permission to run it :)
-
This gives you the latest version number in "bts/" tags!
$ 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!
-
good idea. A script to just update to the latest issue. Will put that in.