mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 16:31:47 +00:00
I ran into issues setting up Sourcegraph on NixOS, because NixOS, like some other distros, doesn't have a /bin/bash. We already use /usr/bin/env in many of our scripts, so this improves consistency, too.
13 lines
362 B
Bash
Executable File
13 lines
362 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -eu -o pipefail
|
|
|
|
REDIRECTS_FILE=../../doc/_resources/assets/redirects
|
|
|
|
# Prints out the HTTP status code for all of the absolute urls in the redirects file.
|
|
dest_urls=$(awk '{print $2;}' <"$REDIRECTS_FILE" | sort | uniq | grep '^https:')
|
|
for URL in $dest_urls; do
|
|
echo -n "$URL "
|
|
curl -s -o /dev/null -w "%{http_code}\n" "$URL"
|
|
done
|