mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-06 02:49:23 +00:00
x-clean-vendordirs: remove broken msgr dependency (not sourced), add set -euo pipefail. x-foreach: replace eval on command args with direct "$@" execution, add usage guard. x-ip: add set -euo pipefail, curl dependency check, and silent-fail flag.
15 lines
265 B
Bash
Executable File
15 lines
265 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Display external IP address.
|
|
#
|
|
# Source: https://github.com/thirtythreeforty/dotfiles/blob/master/bin/extip
|
|
|
|
set -euo pipefail
|
|
|
|
if ! command -v curl &> /dev/null; then
|
|
echo "Error: curl is required" >&2
|
|
exit 1
|
|
fi
|
|
|
|
curl -sf icanhazip.com
|