From bdeef0fb043bb108f88b0b66a0ccb5810af1880c Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Mon, 27 Mar 2023 22:57:35 -0400 Subject: xchangelog: use -L for curl to follow redirects --- xchangelog | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xchangelog b/xchangelog index 77a0753..0fb08d4 100755 --- a/xchangelog +++ b/xchangelog @@ -25,16 +25,16 @@ if [ -z "$changelog" ]; then fi if ! [ -t 1 ]; then - curl -s -- "$changelog" -elif curl -sI -w "%{content_type}" -o /dev/null -- "$changelog" | grep -qi "^text/plain"; then + curl -sL -- "$changelog" +elif curl -sLI -w "%{content_type}" -o /dev/null -- "$changelog" | grep -qi "^text/plain"; then if [ -n "$PAGER" ]; then - curl -s -- "$changelog" | "$PAGER" + curl -sL -- "$changelog" | "$PAGER" elif [[ "$changelog" = *".md" ]] && type mdless >/dev/null; then - curl -s -- "$changelog" | mdless + curl -sL -- "$changelog" | mdless elif type less >/dev/null; then - curl -s -- "$changelog" | less + curl -sL -- "$changelog" | less else - curl -s -- "$changelog" + curl -sL -- "$changelog" fi else if type xdg-open >/dev/null; then -- cgit 1.4.1