Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #5122 from Hexlant/newinstallscript
Browse files Browse the repository at this point in the history
Changed install / uninstall script
  • Loading branch information
heifner authored Aug 10, 2018
2 parents fd59a31 + 2ac3b77 commit 72dad21
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 48 deletions.
86 changes: 42 additions & 44 deletions eosio_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,21 @@
##########################################################################


CWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ "${CWD}" != "${PWD}" ]; then
printf "\\n\\tPlease cd into directory %s to run this script.\\n \\tExiting now.\\n\\n" "${CWD}"
exit 1
fi
CWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ "${CWD}" != "${PWD}" ]; then
printf "\\n\\tPlease cd into directory %s to run this script.\\n \\tExiting now.\\n\\n" "${CWD}"
exit 1
fi

BUILD_DIR="${PWD}/build"
CMAKE_BUILD_TYPE=Release
TIME_BEGIN=$( date -u +%s )
BUILD_DIR="${PWD}/build"
CMAKE_BUILD_TYPE=Release
TIME_BEGIN=$( date -u +%s )
INSTALL_PREFIX="/usr/local/eosio"
VERSION=1.2
VERSION=1.2

txtbld=$(tput bold)
bldred=${txtbld}$(tput setaf 1)
txtrst=$(tput sgr0)
txtbld=$(tput bold)
bldred=${txtbld}$(tput setaf 1)
txtrst=$(tput sgr0)

create_symlink() {
pushd /usr/local/bin &> /dev/null
Expand All @@ -54,57 +54,55 @@
}

install_symlinks() {
printf "\\n\\tInstalling EOSIO Binary Symlinks\\n\\n"
printf "\\n\\tInstalling EOSIO Binary Symlinks\\n\\n"
create_symlink "cleos"
create_symlink "nodeos"
create_symlink "eosio-abigen"
create_symlink "eosio-applesdemo"
create_symlink "eosio-launcher"
create_symlink "eosio-s2wasm"
create_symlink "eosio-wast2wasm"
create_symlink "eosio-keosd"
create_symlink "eosiocpp"
create_symlink "keosd"
create_symlink "nodeos"
}

if [ ! -d "${BUILD_DIR}" ]; then
if [ ! -d "${BUILD_DIR}" ]; then
printf "\\n\\tError, eosio_build.sh has not ran. Please run ./eosio_build.sh first!\\n\\n"
exit -1
fi
fi

${PWD}/scripts/clean_old_install.sh
if [ $? -ne 0 ]; then
printf "\\n\\tError occurred while trying to remove old installation!\\n\\n"
exit -1
fi

if ! pushd "${BUILD_DIR}"
then
printf "Unable to enter build directory %s.\\n Exiting now.\\n" "${BUILD_DIR}"
exit 1;
fi
if ! pushd "${BUILD_DIR}"
then
printf "Unable to enter build directory %s.\\n Exiting now.\\n" "${BUILD_DIR}"
exit 1;
fi

if ! make install
then
printf "\\n\\t>>>>>>>>>>>>>>>>>>>> MAKE installing EOSIO has exited with the above error.\\n\\n"
exit -1
fi
if ! make install
then
printf "\\n\\t>>>>>>>>>>>>>>>>>>>> MAKE installing EOSIO has exited with the above error.\\n\\n"
exit -1
fi
popd &> /dev/null

install_symlinks

printf "\n\n${bldred}\t _______ _______ _______ _________ _______\n"
printf '\t( ____ \( ___ )( ____ \\\\__ __/( ___ )\n'
printf "\t| ( \/| ( ) || ( \/ ) ( | ( ) |\n"
printf "\t| (__ | | | || (_____ | | | | | |\n"
printf "\t| __) | | | |(_____ ) | | | | | |\n"
printf "\t| ( | | | | ) | | | | | | |\n"
printf "\t| (____/\| (___) |/\____) |___) (___| (___) |\n"
printf "\t(_______/(_______)\_______)\_______/(_______)\n${txtrst}"

printf "\\tTo verify your installation run the following commands:\\n"
printf "\n\n${bldred}\t _______ _______ _______ _________ _______\n"
printf '\t( ____ \( ___ )( ____ \\\\__ __/( ___ )\n'
printf "\t| ( \/| ( ) || ( \/ ) ( | ( ) |\n"
printf "\t| (__ | | | || (_____ | | | | | |\n"
printf "\t| __) | | | |(_____ ) | | | | | |\n"
printf "\t| ( | | | | ) | | | | | | |\n"
printf "\t| (____/\| (___) |/\____) |___) (___| (___) |\n"
printf "\t(_______/(_______)\_______)\_______/(_______)\n${txtrst}"

printf "\\tFor more information:\\n"
printf "\\tEOSIO website: https://eos.io\\n"
printf "\\tEOSIO Telegram channel @ https://t.me/EOSProject\\n"
printf "\\tEOSIO resources: https://eos.io/resources/\\n"
printf "\\tEOSIO Stack Exchange: https://eosio.stackexchange.com\\n"
printf "\\tEOSIO wiki: https://github.com/EOSIO/eos/wiki\\n\\n\\n"
printf "\\tFor more information:\\n"
printf "\\tEOSIO website: https://eos.io\\n"
printf "\\tEOSIO Telegram channel @ https://t.me/EOSProject\\n"
printf "\\tEOSIO resources: https://eos.io/resources/\\n"
printf "\\tEOSIO Stack Exchange: https://eosio.stackexchange.com\\n"
printf "\\tEOSIO wiki: https://github.com/EOSIO/eos/wiki\\n\\n\\n"
9 changes: 5 additions & 4 deletions eosio_uninstall.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#! /bin/bash

binaries=(cleos
nodeos
eosio-keosd
eosio-abigen
eosio-applesdemo
eosio-launcher
eosio-s2wasm
eosio-wast2wasm)
eosio-wast2wasm
eosiocpp
keosd
nodeos
eosio-applesdemo)

if [ -d "/usr/local/eosio" ]; then
printf "\tDo you wish to remove this install? (requires sudo)\n"
Expand Down

0 comments on commit 72dad21

Please sign in to comment.