turn on debugging for a minute

This commit is contained in:
AJ ONeal 2018-06-23 23:19:11 -06:00
parent 39776e2d63
commit 9968aad7a6
1 changed files with 9 additions and 7 deletions

View File

@ -78,6 +78,7 @@ fi
echo "" echo ""
my_tmp="$(mktemp -d)"
#TELEBIT_TMP="$my_tmp/telebit" #TELEBIT_TMP="$my_tmp/telebit"
TELEBIT_REAL_PATH=${TELEBIT_PATH:-} TELEBIT_REAL_PATH=${TELEBIT_PATH:-}
TELEBIT_TMP=${TELEBIT_PATH:-} TELEBIT_TMP=${TELEBIT_PATH:-}
@ -103,15 +104,14 @@ real_sudo_cmd=$soft_sudo_cmd
real_sudo_cmde=$soft_sudo_cmde real_sudo_cmde=$soft_sudo_cmde
set +e set +e
my_tmp="$(mktemp -d)" mkdir -p $my_tmp "$TELEBIT_REAL_PATH" "$TELEBIT_REAL_PATH/etc" "$TELEBIT_REAL_PATH/var/log" 2>/dev/null && \
mkdir -p $my_tmp "$TELEBIT_REAL_PATH" "$TELEBIT_REAL_PATH/etc" "$TELEBIT_REAL_PATH/var/log" 2>/dev/null chown -R $(id -u -n):$(id -g -n) $my_tmp "$TELEBIT_REAL_PATH" 2>/dev/null
chown -R $(id -u -n):$(id -g -n) "$TELEBIT_REAL_PATH" 2>/dev/null
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
soft_sudo_cmd=" " soft_sudo_cmd=" "
soft_sudo_cmde="" soft_sudo_cmde=""
else else
$soft_sudo_cmd mkdir -p $my_tmp "$TELEBIT_REAL_PATH" "$TELEBIT_REAL_PATH/etc" "$TELEBIT_REAL_PATH/var/log" $soft_sudo_cmd mkdir -p $my_tmp "$TELEBIT_REAL_PATH" "$TELEBIT_REAL_PATH/etc" "$TELEBIT_REAL_PATH/var/log"
$soft_sudo_cmd chown -R $(id -u -n):$(id -g -n) "$TELEBIT_REAL_PATH" $soft_sudo_cmd chown -R $(id -u -n):$(id -g -n) $my_tmp "$TELEBIT_REAL_PATH"
fi fi
set -e set -e
@ -124,14 +124,15 @@ http_bash https://git.coolaj86.com/coolaj86/node-installer.sh/raw/branch/master/
# #
my_node="$TELEBIT_REAL_PATH/bin/node" my_node="$TELEBIT_REAL_PATH/bin/node"
my_tmp_node="$TELEBIT_TMP/bin/node" tmp_node="$TELEBIT_TMP/bin/node"
my_npm="$my_node $TELEBIT_TMP/bin/npm" my_npm="$my_node $TELEBIT_TMP/bin/npm"
my_tmp_npm="$my_tmp_node $TELEBIT_TMP/bin/npm" tmp_npm="$tmp_node $TELEBIT_TMP/bin/npm"
#https://git.coolaj86.com/coolaj86/telebit.js.git #https://git.coolaj86.com/coolaj86/telebit.js.git
#https://git.coolaj86.com/coolaj86/telebit.js/archive/:tree:.tar.gz #https://git.coolaj86.com/coolaj86/telebit.js/archive/:tree:.tar.gz
#https://git.coolaj86.com/coolaj86/telebit.js/archive/:tree:.zip #https://git.coolaj86.com/coolaj86/telebit.js/archive/:tree:.zip
set +e set +e
set -x
my_unzip=$(type -p unzip) my_unzip=$(type -p unzip)
my_tar=$(type -p tar) my_tar=$(type -p tar)
# TODO extract to temporary directory, configure, copy etc, replace # TODO extract to temporary directory, configure, copy etc, replace
@ -152,12 +153,13 @@ else
echo "Neither tar nor unzip found. Abort." echo "Neither tar nor unzip found. Abort."
exit 13 exit 13
fi fi
set +x
set -e set -e
pushd $TELEBIT_TMP >/dev/null pushd $TELEBIT_TMP >/dev/null
echo " - installing telebit npm dependencies to '$TELEBIT_REAL_PATH'..." echo " - installing telebit npm dependencies to '$TELEBIT_REAL_PATH'..."
echo " (are you noticing a pattern of where things are installed?)" echo " (are you noticing a pattern of where things are installed?)"
$my_tmp_npm install >/dev/null 2>/dev/null $tmp_npm install >/dev/null 2>/dev/null
popd >/dev/null popd >/dev/null
echo " - configuring telebit..." echo " - configuring telebit..."