mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-20 00:55:14 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user