Skip to content
Snippets Groups Projects
Commit 2e9ef5f0 authored by Keegan Mullaney's avatar Keegan Mullaney
Browse files

replace [[:digit:]] with \w in grep commands

\w matches all numbers rather than just a single digit
parent 24c0adf9
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -124,7 +124,7 @@ qc_install_ruby() {
# export MAKE=make
 
# install the latest stable ruby version
ruby_global_v=$(~/.rbenv/bin/rbenv install --list | tr -d ' ' | grep "^[[:digit:]].[[:digit:]].[[:digit:]]$" | tail -1)
ruby_global_v=$(~/.rbenv/bin/rbenv install --list | tr -d ' ' | grep "^\w.\w.\w$" | tail -1)
[ $? -eq 0 ] && ~/.rbenv/bin/rbenv install "$ruby_global_v"
 
# set global ruby version
Loading
Loading
Loading
Loading
@@ -43,12 +43,12 @@ qc_nvm() {
lkm_has nvm || lkm_error "nvm install failed"
 
# get latest version
node_v=$(nvm ls-remote | grep "${NODE_LTS_V}.[[:digit:]].[[:digit:]]" | tr -d 'v ' | cut -d'(' -f1 | tail -1)
node_v=$(nvm ls-remote | grep "$NODE_LTS_V.\w.\w*" | tr -d ' ' | cut -d'(' -f1 | tail -1)
 
# install nodejs
nvm install "$node_v"
 
if [ $? -eq 0 ]; then
# if [ $? -eq 0 ]; then
echo "setting nvm default to $node_v"
nvm alias default "$node_v"
 
Loading
Loading
@@ -63,7 +63,7 @@ qc_nvm() {
npm -v
 
lkm_notify "After switching node versions, remember to run \`npm build\`."
fi
# fi
 
RET="$?"
lkm_debug
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment