about summary refs log tree commit diff
diff options
context:
space:
mode:
authorclassabbyamp <void@placeviolette.net>2023-03-27 22:57:35 -0400
committerLeah Neukirchen <leah@vuxu.org>2023-03-28 19:49:26 +0200
commitbdeef0fb043bb108f88b0b66a0ccb5810af1880c (patch)
tree87248ead1bb9ca9a9708995a7ec382511f5deef9
parentb3230058215c3c9a6ff18ff3c3e6fce50e4f9a26 (diff)
downloadxtools-bdeef0fb043bb108f88b0b66a0ccb5810af1880c.tar.gz
xtools-bdeef0fb043bb108f88b0b66a0ccb5810af1880c.tar.xz
xtools-bdeef0fb043bb108f88b0b66a0ccb5810af1880c.zip
xchangelog: use -L for curl to follow redirects
-rwxr-xr-xxchangelog12
1 files 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