From 2c8ec73df36323d4a58df8cfe30302ecca2722d7 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 16 Jun 2016 16:19:24 -0300 Subject: Install: merge hydractl/hydra codebase --- share/hydractl/install | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'share/hydractl/install') diff --git a/share/hydractl/install b/share/hydractl/install index 00298e3..4e05848 100755 --- a/share/hydractl/install +++ b/share/hydractl/install @@ -20,26 +20,23 @@ source $APP_BASE/lib/hydra/functions || exit 1 hydra_config_load -# Validation -if [ -z "$ORIGIN" ]; then - ORIGIN="git://git.fluxo.info/hydra.git" -fi - # Set sudo config if [ "`whoami`" != 'root' ]; then sudo="sudo" fi -# Deploy -echo "Installing to local node..." - -if ! which git &> /dev/null; then - echo "Installing git..." - $sudo apt-get update - $sudo apt-get install git-core -y -fi - -# Git version +# Deploy, git version +# +#if ! which git &> /dev/null; then +# echo "Installing git..." +# $sudo apt-get update +# $sudo apt-get install git -y +#fi +# +#if [ -z "$ORIGIN" ]; then +# ORIGIN="git://git.fluxo.info/hydra.git" +#fi +# #if [ ! -d /usr/local/share/hydra ]; then # $sudo git clone $ORIGIN /usr/local/share/hydra # ( cd /usr/local/share/hydra ; $sudo git reset --hard $COMMIT ) @@ -47,8 +44,11 @@ fi # ( cd /usr/local/share/hydra ; $sudo git pull ; $sudo git reset --hard $COMMIT ) #fi -# Rsync version -$sudo rsync -av --delete $APP_BASE/ /usr/local/share/hydra/ +# Deploy, rsync version +if [ "$APP_BASE" != "/usr/local/share/hydra" ]; then + echo "Installing into /usr/local/share/hydra..." + $sudo rsync -av --delete $APP_BASE/ /usr/local/share/hydra/ +fi # Update symlinks $sudo ln -sf /usr/local/share/hydra/hydra /usr/local/bin/hydra -- cgit v1.2.3