Skip to content

Commit

Permalink
Simplify $dots with string substitution
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterDaveHello committed Mar 23, 2019
1 parent 0b0035d commit 1866217
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/n
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ install() {
local version=${1#v}

local dots
dots="$(echo "$version" | sed 's/[^.]*//g')"
dots="${version//[^.]*/}"
if test ${#dots} -lt 2; then
version="$($GET 2> /dev/null "${MIRROR[DEFAULT]}" \
| grep -E "</a>" \
Expand Down

0 comments on commit 1866217

Please sign in to comment.