mirror of
https://github.com/rwxrob/dot
synced 2024-11-18 15:25:52 +00:00
27 lines
551 B
Bash
Executable File
27 lines
551 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
declare target="$1"
|
|
declare red=$'\033[38;2;255;0;0m'
|
|
declare grey=$'\033[38;2;100;100;100m'
|
|
declare green=$'\033[38;2;0;255;0m'
|
|
declare x=$'\033[0m'
|
|
|
|
if [[ -z "$(which muffet)" ]]; then
|
|
echo "${red}Requires ${grey}https://github.com/raviqqe/muffet ${red}be installed.${x}"
|
|
exit 1
|
|
fi
|
|
|
|
if [[ -z "$target" ]]; then
|
|
echo "usage: checkurls <pageurl>"
|
|
exit 1
|
|
fi
|
|
|
|
if [[ ${1:0:4} != http ]]; then
|
|
target="http://$1"
|
|
fi
|
|
|
|
muffet --one-page-only "$target"
|
|
if [[ $? -eq 0 ]];then
|
|
echo "${green}No Broken URLs detected.${x}"
|
|
fi
|