fix: resolve critical issues in x-clean-vendordirs, x-foreach, x-ip

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.
This commit is contained in:
2026-02-05 20:52:15 +02:00
parent fc8db1f5b5
commit efd9eebc85
3 changed files with 33 additions and 13 deletions

View File

@@ -1,4 +1,14 @@
#!/usr/bin/env bash
#
# Display external IP address.
#
# Source: https://github.com/thirtythreeforty/dotfiles/blob/master/bin/extip
curl icanhazip.com "${@}"
set -euo pipefail
if ! command -v curl &> /dev/null; then
echo "Error: curl is required" >&2
exit 1
fi
curl -sf icanhazip.com