未验证 提交 72dad213 编写于 作者: K Kevin Heifner 提交者: GitHub

Merge pull request #5122 from Hexlant/newinstallscript

Changed install / uninstall script
...@@ -31,21 +31,21 @@ ...@@ -31,21 +31,21 @@
########################################################################## ##########################################################################
CWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" CWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ "${CWD}" != "${PWD}" ]; then if [ "${CWD}" != "${PWD}" ]; then
printf "\\n\\tPlease cd into directory %s to run this script.\\n \\tExiting now.\\n\\n" "${CWD}" printf "\\n\\tPlease cd into directory %s to run this script.\\n \\tExiting now.\\n\\n" "${CWD}"
exit 1 exit 1
fi fi
BUILD_DIR="${PWD}/build" BUILD_DIR="${PWD}/build"
CMAKE_BUILD_TYPE=Release CMAKE_BUILD_TYPE=Release
TIME_BEGIN=$( date -u +%s ) TIME_BEGIN=$( date -u +%s )
INSTALL_PREFIX="/usr/local/eosio" INSTALL_PREFIX="/usr/local/eosio"
VERSION=1.2 VERSION=1.2
txtbld=$(tput bold) txtbld=$(tput bold)
bldred=${txtbld}$(tput setaf 1) bldred=${txtbld}$(tput setaf 1)
txtrst=$(tput sgr0) txtrst=$(tput sgr0)
create_symlink() { create_symlink() {
pushd /usr/local/bin &> /dev/null pushd /usr/local/bin &> /dev/null
...@@ -54,21 +54,21 @@ ...@@ -54,21 +54,21 @@
} }
install_symlinks() { install_symlinks() {
printf "\\n\\tInstalling EOSIO Binary Symlinks\\n\\n" printf "\\n\\tInstalling EOSIO Binary Symlinks\\n\\n"
create_symlink "cleos" create_symlink "cleos"
create_symlink "nodeos"
create_symlink "eosio-abigen" create_symlink "eosio-abigen"
create_symlink "eosio-applesdemo"
create_symlink "eosio-launcher" create_symlink "eosio-launcher"
create_symlink "eosio-s2wasm" create_symlink "eosio-s2wasm"
create_symlink "eosio-wast2wasm" 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" printf "\\n\\tError, eosio_build.sh has not ran. Please run ./eosio_build.sh first!\\n\\n"
exit -1 exit -1
fi fi
${PWD}/scripts/clean_old_install.sh ${PWD}/scripts/clean_old_install.sh
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
...@@ -76,35 +76,33 @@ ...@@ -76,35 +76,33 @@
exit -1 exit -1
fi fi
if ! pushd "${BUILD_DIR}" if ! pushd "${BUILD_DIR}"
then then
printf "Unable to enter build directory %s.\\n Exiting now.\\n" "${BUILD_DIR}" printf "Unable to enter build directory %s.\\n Exiting now.\\n" "${BUILD_DIR}"
exit 1; exit 1;
fi fi
if ! make install if ! make install
then then
printf "\\n\\t>>>>>>>>>>>>>>>>>>>> MAKE installing EOSIO has exited with the above error.\\n\\n" printf "\\n\\t>>>>>>>>>>>>>>>>>>>> MAKE installing EOSIO has exited with the above error.\\n\\n"
exit -1 exit -1
fi fi
popd &> /dev/null popd &> /dev/null
install_symlinks install_symlinks
printf "\n\n${bldred}\t _______ _______ _______ _________ _______\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" printf "\t| __) | | | |(_____ ) | | | | | |\n"
printf "\t| ( | | | | ) | | | | | | |\n" printf "\t| ( | | | | ) | | | | | | |\n"
printf "\t| (____/\| (___) |/\____) |___) (___| (___) |\n" printf "\t| (____/\| (___) |/\____) |___) (___| (___) |\n"
printf "\t(_______/(_______)\_______)\_______/(_______)\n${txtrst}" printf "\t(_______/(_______)\_______)\_______/(_______)\n${txtrst}"
printf "\\tTo verify your installation run the following commands:\\n"
printf "\\tFor more information:\\n" printf "\\tFor more information:\\n"
printf "\\tEOSIO website: https://eos.io\\n" printf "\\tEOSIO website: https://eos.io\\n"
printf "\\tEOSIO Telegram channel @ https://t.me/EOSProject\\n" printf "\\tEOSIO Telegram channel @ https://t.me/EOSProject\\n"
printf "\\tEOSIO resources: https://eos.io/resources/\\n" printf "\\tEOSIO resources: https://eos.io/resources/\\n"
printf "\\tEOSIO Stack Exchange: https://eosio.stackexchange.com\\n" printf "\\tEOSIO Stack Exchange: https://eosio.stackexchange.com\\n"
printf "\\tEOSIO wiki: https://github.com/EOSIO/eos/wiki\\n\\n\\n" printf "\\tEOSIO wiki: https://github.com/EOSIO/eos/wiki\\n\\n\\n"
#! /bin/bash #! /bin/bash
binaries=(cleos binaries=(cleos
nodeos
eosio-keosd
eosio-abigen eosio-abigen
eosio-applesdemo
eosio-launcher eosio-launcher
eosio-s2wasm eosio-s2wasm
eosio-wast2wasm) eosio-wast2wasm
eosiocpp
keosd
nodeos
eosio-applesdemo)
if [ -d "/usr/local/eosio" ]; then if [ -d "/usr/local/eosio" ]; then
printf "\tDo you wish to remove this install? (requires sudo)\n" printf "\tDo you wish to remove this install? (requires sudo)\n"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册