Bitcoin Forum
May 23, 2024, 05:51:44 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Install script for Ubuntu  (Read 1221 times)
btchris (OP)
Hero Member
*****
Offline Offline

Activity: 672
Merit: 504

a.k.a. gurnec on GitHub


View Profile WWW
July 30, 2014, 08:58:30 PM
 #1

This is an install script for Armory on Ubuntu. It's nothing real special, but I needed it for myself (for Travis CI) and thought I may as well share.

It locates and automatically downloads, verifies, and installs the latest stable version of Armory plus all required prerequisites. Please note that on Ubuntu Server edition, there are a lot of GUI-related prerequisites that while technically required (and installed by this script), aren't required in practice, so you may prefer not to use this script in that case.

Code:
#!/bin/bash

set -e

DOWNLOADS="`curl -fsS --retry 10 https://s3.amazonaws.com/bitcoinarmory-media/announce.txt | awk '/^downloads/{print $2}'`"
echo "$DOWNLOADS" | grep -q '^https://' || { echo "Can't find Armory downloads URL"; exit 1; }

uname -m | grep -q '64$' && BITS=64 || BITS=32
LATEST="`curl -fsS --retry 10 \"$DOWNLOADS\" | grep "^Armory [0-9.]* Ubuntu [0-9.,]*\`lsb_release -rs\`[0-9.,]* $BITS " | sort -k 2V | tail -1 | awk '{print $6}'`"
echo "$LATEST" | grep -q '^https://' || { echo "Can't find latest Armory download URL"; exit 1; }

curl -fsS --retry 10 -o '/tmp/armory.deb' "$LATEST"

sudo apt-get update
sudo apt-get install dpkg-sig gdebi-core

gpg -q --keyserver keyserver.ubuntu.com --recv-keys 98832223
dpkg-sig --verify /tmp/armory.deb | grep -q 'GOODSIG.*821F122936BDD565366AC36A4AB16AEA98832223' || { echo "Signature verification failed"; exit 1; }

sudo gdebi /tmp/armory.deb
rm /tmp/armory.deb

Here's a version for unattended installation (the one I use for Travis CI, more or less):

Code:
#!/bin/bash

set -e

DOWNLOADS="`curl -fsS --retry 10 https://s3.amazonaws.com/bitcoinarmory-media/announce.txt | awk '/^downloads/{print $2}'`"
echo "$DOWNLOADS" | grep -q '^https://' || { echo "Can't find Armory downloads URL"; exit 1; }

uname -m | grep -q '64$' && BITS=64 || BITS=32
LATEST="`curl -fsS --retry 10 \"$DOWNLOADS\" | grep "^Armory [0-9.]* Ubuntu [0-9.,]*\`lsb_release -rs\`[0-9.,]* $BITS " | sort -k 2V | tail -1 | awk '{print $6}'`"
echo "$LATEST" | grep -q '^https://' || { echo "Can't find latest Armory download URL"; exit 1; }

curl -fsS --retry 10 -o '/tmp/armory.deb' "$LATEST"

sudo apt-get -q update
sudo apt-get -yq install dpkg-sig gdebi-core

gpg -q --keyserver keyserver.ubuntu.com --recv-keys 98832223
dpkg-sig --verify /tmp/armory.deb | grep -q 'GOODSIG.*821F122936BDD565366AC36A4AB16AEA98832223' || { echo "Signature verification failed"; exit 1; }

sudo gdebi -nq /tmp/armory.deb
rm /tmp/armory.deb

It's not as thorough as the built-in secure downloader because it only checks the signatures of the very last download (the install .deb file itself), but it was good enough for my purposes.
KriszDev
Sr. Member
****
Offline Offline

Activity: 364
Merit: 250


View Profile
July 31, 2014, 09:01:56 AM
 #2

Is it compile the source?
btchris (OP)
Hero Member
*****
Offline Offline

Activity: 672
Merit: 504

a.k.a. gurnec on GitHub


View Profile WWW
July 31, 2014, 01:45:23 PM
 #3

Is it compile the source?

No, it installs the official .deb package (compiled and signed by the Armory devs).
SMB-2525
Full Member
***
Offline Offline

Activity: 195
Merit: 100


View Profile
August 03, 2014, 08:10:54 PM
 #4

I just installed onto Mint. Armory did a great job of pointing me to, downloading and installing bitcoin core. Very slick.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!