Skip to content

Commit

Permalink
correct start_rest_server.sh for v0.15
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Dill authored and Robert Dill committed Jan 2, 2018
2 parents 42d4995 + 93e2104 commit 6ce879a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
Binary file modified Chapter11/Documentation/Z2B Chapter11.pdf
Binary file not shown.
19 changes: 8 additions & 11 deletions setup_Ubuntu_Part_1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,11 @@
# Array of supported versions
declare -a versions=('trusty' 'xenial' 'yakkety');


# check the version and extract codename of ubuntu if release codename not provided by user
lsb_release -a || (echo "Error: Release information not found, run script passing Ubuntu version codename as a parameter"; exit 1)
CODENAME=$(lsb_release -a | grep 'Codename:' | awk '{print $2}')

# check version is supported
if echo ${versions[@]} | grep -q -w ${CODENAME}; then
echo "Installing Hyperledger Composer prereqs for Ubuntu ${CODENAME}"
else
echo "Error: Ubuntu ${CODENAME} is not supported"
exit 1
fi


# indent text on echo
function indent() {
c='s/^/ /'
Expand Down Expand Up @@ -50,14 +42,19 @@ function getCurrent()
UBUNTU_ARCH=`uname -m`
UBUNTU_VERSION=`lsb_release -c | grep "Codename:" | awk '{print $2}'`
showStep "found Ubuntu ${UBUNTU_VERSION} as an ${UBUNTU_ARCH} system"
# check for 64 bit Ubuntu
if [[ $UBUNTU_ARCH != "x86_64" ]]; then
showStep "Install Failed, need a 64 bit system. This is ${UBUNTU_ARCH}"
exit 1
fi
if [[ ${UBUNTU_VERSION} != "xenial" ]]; then
showStep "Install Failed, need a Ubuntu 16 LTS. This is ${UBUNTU_VERSIO}"
# check version is supported
if echo ${versions[@]} | grep -q -w ${CODENAME}; then
echo "Installing Hyperledger Composer prereqs for Ubuntu ${CODENAME}"
else
echo "Error: Ubuntu ${CODENAME} is not supported"
exit 1
fi

}

# update and upgrade apt-get
Expand Down

0 comments on commit 6ce879a

Please sign in to comment.