mirror of
https://github.com/notwa/rc
synced 2024-11-05 02:29:06 -08:00
10 lines
177 B
Bash
Executable file
10 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 "$@"
|