match literal '.' for version, not wildcard
This commit is contained in:
parent
2d628014d0
commit
be9344dbea
|
@ -255,10 +255,10 @@ my_count=$(awk -F"${my_char}" '{print NF-1}' <<< "${NODEJS_VER}")
|
|||
# get the latest version if partial
|
||||
if [ $my_count -ne 2 ]; then
|
||||
if [ -n "$(type -p curl)" ]; then
|
||||
NODEJS_VER=$(curl -fsL "$NODEJS_BASE_URL/dist/index.tab" | tail -n +2 | cut -f 1 | grep "^$NODEJS_VER." | head -n 1) \
|
||||
NODEJS_VER=$(curl -fsL "$NODEJS_BASE_URL/dist/index.tab" | tail -n +2 | cut -f 1 | grep "^$NODEJS_VER\." | head -n 1) \
|
||||
|| echo 'error automatically determining current node.js version'
|
||||
elif [ -n "$(type -p wget)" ]; then
|
||||
NODEJS_VER=$(wget --quiet "$NODEJS_BASE_URL/dist/index.tab" -O - | tail -n +2 | cut -f 1 | grep "^$NODEJS_VER." | head -n 1) \
|
||||
NODEJS_VER=$(wget --quiet "$NODEJS_BASE_URL/dist/index.tab" -O - | tail -n +2 | cut -f 1 | grep "^$NODEJS_VER\." | head -n 1) \
|
||||
|| echo 'error automatically determining current node.js version'
|
||||
else
|
||||
echo "Found neither 'curl' nor 'wget'. Can't Continue."
|
||||
|
|
Loading…
Reference in New Issue