bug fixes

This commit is contained in:
AJ ONeal
2020-05-04 11:30:42 +00:00
parent 0e4ec7e16b
commit 3c08ddc94b
3 changed files with 11 additions and 12 deletions
+1 -1
View File
@@ -69,7 +69,7 @@ if [ -e "$new_node_home/bin/node" ]; then
exit 0
fi
fi
if [ "$cur_node" != "$new_node" ]; then
if [ -n "$cur_node" ] && [ "$cur_node" != "$new_node" ]; then
echo "WARN: possible conflict with node v$WEBI_VERSION at $cur_node"
fi
+6 -11
View File
@@ -32,16 +32,6 @@
set -e
set -u
# Get arch envs, etc
my_url="https://rootprojects.org/serviceman/dist/$(uname -s)/$(uname -m)/serviceman"
curl -fsSL "$my_url" -o serviceman
echo ""
# Make executable
chmod +x ./serviceman
# Move to ~/.local/bin
mkdir -p ~/.local/bin
mv ./serviceman ~/.local/bin
# Test if in PATH
set +e
my_serviceman=$(command -v serviceman)
@@ -54,6 +44,11 @@ if [ -n "$my_serviceman" ]; then
fi
fi
# Get arch envs, etc
webi_download "https://rootprojects.org/serviceman/dist/$(uname -s)/$(uname -m)/serviceman" "$HOME/Downloads/serviceman"
chmod +x "$HOME/Downloads/serviceman"
mv "$HOME/Downloads/serviceman" "$HOME/.local/bin/"
# add to ~/.local/bin to PATH, just in case
pathman add ~/.local/bin # > /dev/null 2> /dev/null
webi_path_add $HOME/.local/bin # > /dev/null 2> /dev/null
# TODO inform user to add to path, apart from pathman?
+4
View File
@@ -45,6 +45,10 @@ webi_download() {
if [ -n "${1:-}" ]; then
my_url="$1"
else
if [ "error" == "$WEBI_CHANNEL" ]; then
echo "Could not find $WEBI_NAME v$WEBI_VERSION"
exit 1
fi
my_url="$WEBI_PKG_URL"
echo "Downloading $WEBI_NAME v$WEBI_VERSION"
fi