1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-05-18 17:53:23 -07:00
rc/sh/isup
2021-07-29 00:37:35 -07:00

11 lines
177 B
Bash
Executable File

#!/usr/bin/zsh
# YES_ZSH
isup() {
local c
curl -sLI -w '%{http_code}' -o /dev/null "$1" | read -r c
[ "${c:0:1}" -eq 2 ]
}
[ "${SOURCING:-0}" -gt 0 ] || isup "$@"