From 4128167ef0f9e7da9d13ce46f2dd1ecc32136764 Mon Sep 17 00:00:00 2001 From: Brian Zalewski <59970525+ProfessorManhattan@users.noreply.github.com> Date: Wed, 14 Jun 2023 06:40:48 +0000 Subject: [PATCH] Latest --- .../run_onchange_after_18-install-sdkman.sh.tmpl | 4 ++-- home/dot_local/scripts/motd.bash | 13 +++++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/home/.chezmoiscripts/universal/run_onchange_after_18-install-sdkman.sh.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_18-install-sdkman.sh.tmpl index a0d399f0..73b3cab6 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_18-install-sdkman.sh.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_18-install-sdkman.sh.tmpl @@ -13,8 +13,8 @@ if [ ! -d "$SDKMAN_DIR" ]; then logg info 'Installing SDKMan via `curl -s "https://get.sdkman.io?rcupdate=false`' logg info "Install directory: $SDKMAN_DIR" curl -s "https://get.sdkman.io?rcupdate=false" | bash - logg info 'Running `sdk install java`' - sdk install java + logg info 'Running `sdk install java` with bash -c' + bash -c 'sdk install java' else logg info 'SDKMan appears to already be installed.' fi diff --git a/home/dot_local/scripts/motd.bash b/home/dot_local/scripts/motd.bash index acc35a3a..db7ce048 100644 --- a/home/dot_local/scripts/motd.bash +++ b/home/dot_local/scripts/motd.bash @@ -266,10 +266,15 @@ print_banner() { printf " \\033[%sm%s OS \\033[0m %s\\n" "$UPDATES_ZERO_COLOR" "" "macOS $(sw_vers -productVersion) / Build $(sw_vers -buildVersion)" printf " \\033[%sm%s UUID \\033[0m %s\\n" "$PODMAN_RUNNING_COLOR" "" "$(ioreg -d2 -c IOPlatformExpertDevice | awk -F\" '/IOPlatformUUID/{print $(NF-1)}')" printf " \\033[%sm%s LAN IP \\033[0m %s\\n" "$BANNER_KERNEL_COLOR" "ﯱ" "$(ifconfig en0 2>/dev/null | grep 'inet ' | cut -d ' ' -f 2)" - IP_ADDR_PUB="$(timeout 1 sh -c 'curl -sSL ifconfig.me')" - if [ -n "$IP_ADDR_PUB" ]; then - printf " \\033[%sm%s Public IP\\033[0m %s\\n" "$UPDATES_SECURITY_COLOR" "" "$IP_ADDR_PUB" - fi + ### Disabled because it causes slight delay due to server call for public IP + # if command -v timeout > /dev/null; then + # IP_ADDR_PUB="$(timeout 1 sh -c 'curl -sSL ifconfig.me')" + # else + # IP_ADDR_PUB="$(sh -c 'curl -sSL ifconfig.me')" + # fi + # if [ -n "$IP_ADDR_PUB" ]; then + # printf " \\033[%sm%s Public IP\\033[0m %s\\n" "$UPDATES_SECURITY_COLOR" "" "$IP_ADDR_PUB" + # fi fi fi }