Skip to content

Commit

Permalink
refactor: combine multiple sed statements
Browse files Browse the repository at this point in the history
  • Loading branch information
particledecay committed Feb 2, 2021
1 parent 20678a3 commit 97c75a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/download
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ download() {
local -r download_url="$(get_download_url $filename)"

echo "Downloading ${toolname} version ${ASDF_INSTALL_VERSION} from ${download_url}"
if $CURL -fL "${download_url}" -o "${ASDF_DOWNLOAD_PATH}/${filename}"
if $CURL -fsL "${download_url}" -o "${ASDF_DOWNLOAD_PATH}/${filename}"
then
echo "Successfully downloaded ${filename}"
exit 0
Expand Down
2 changes: 1 addition & 1 deletion bin/list-all
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ function sort_versions() {
LC_ALL=C sort -t. -k 1,1 -k 2,2n -k 3,3n
}

versions=$($CURL -fL "https://api.github.com/repos/$repository/releases" | grep tag_name | sed -e 's/"tag_name": //g;s/"//g;s/,//g' -e 's/v//g' -e '/1.6.0/q')
versions=$($CURL -fsL "https://api.github.com/repos/$repository/releases" | grep tag_name | sed 's/"tag_name": //g;s/"//g;s/,//g;s/v//g;/1.6.0/q')
echo "$versions" | sort_versions | xargs

0 comments on commit 97c75a6

Please sign in to comment.