Compare commits

..

3 Commits

Author SHA1 Message Date
CanbiZ (MickLesk) e97657b0c8 Fix comment formatting in tools.func 2026-07-16 13:51:05 +02:00
CanbiZ (MickLesk) 9cbfeb1b7d Refactor Ruby version installation script 2026-07-16 13:50:14 +02:00
CanbiZ (MickLesk) bd4870a542 tools.func: enhance rbenv with profile updates / bundle in bashrc
Added checks to update shell profile files for rbenv integration and removed redundant profile setup code.
2026-07-16 13:45:54 +02:00
5 changed files with 21 additions and 12 deletions
-8
View File
@@ -502,14 +502,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
</details>
## 2026-07-17
### 🧰 Tools
- #### ✨ New Features
- update-lxc: autoremove and autoclean after apt full-upgrade [@soupy-boy](https://github.com/soupy-boy) ([#15831](https://github.com/community-scripts/ProxmoxVE/pull/15831))
## 2026-07-16
### 🆕 New Scripts
-1
View File
@@ -28,7 +28,6 @@ function update_script() {
msg_error "No ${APP} Installation Found!"
exit
fi
ensure_dependencies libusb-1.0-0
msg_info "Stopping Service"
systemctl stop esphome-device-builder 2>/dev/null || true
+1 -2
View File
@@ -14,8 +14,7 @@ network_check
update_os
msg_info "Installing Dependencies"
$STD apt install -y git \
libusb-1.0-0
$STD apt install -y git
msg_ok "Installed Dependencies"
PYTHON_VERSION="3.12" setup_uv
+19
View File
@@ -8677,6 +8677,7 @@ setup_postgresql_db() {
export PG_DB_USER
export PG_DB_PASS
}
# ------------------------------------------------------------------------------
# Installs rbenv and ruby-build, installs Ruby and optionally Rails.
#
@@ -8696,8 +8697,26 @@ setup_ruby() {
local RBENV_DIR="$HOME/.rbenv"
local RBENV_BIN="$RBENV_DIR/bin/rbenv"
local PROFILE_FILE="$HOME/.profile"
local BASH_PROFILE_FILE="$HOME/.bash_profile"
local BASHRC_FILE="$HOME/.bashrc"
local TMP_DIR=$(mktemp -d)
if ! grep -q 'rbenv init' "$PROFILE_FILE" 2>/dev/null; then
cat <<'EOF' >>"$PROFILE_FILE"
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
EOF
fi
if ! grep -q '.rbenv/shims' "$PROFILE_FILE" 2>/dev/null; then
echo 'export PATH="$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH"' >>"$PROFILE_FILE"
fi
if [[ -f "$BASH_PROFILE_FILE" ]] && ! grep -q '.rbenv/shims' "$BASH_PROFILE_FILE"; then
echo 'export PATH="$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH"' >>"$BASH_PROFILE_FILE"
fi
if [[ -f "$BASHRC_FILE" ]] && ! grep -q '.rbenv/shims' "$BASHRC_FILE"; then
echo 'export PATH="$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH"' >>"$BASHRC_FILE"
fi
# Get currently installed Ruby version
local CURRENT_RUBY_VERSION=""
if [[ -x "$RBENV_BIN" ]]; then
+1 -1
View File
@@ -78,7 +78,7 @@ function update_container() {
alpine) pct exec "$container" -- ash -c "apk -U upgrade" ;;
archlinux) pct exec "$container" -- bash -c "pacman -Syyu --noconfirm" ;;
fedora | rocky | centos | alma) pct exec "$container" -- bash -c "dnf -y update && dnf -y upgrade" ;;
ubuntu | debian | devuan) pct exec "$container" -- bash -c "apt-get update 2>/dev/null | grep 'packages.*upgraded'; apt list --upgradable 2>/dev/null | cat && apt-get -yq dist-upgrade 2>&1; apt-get -yq autoremove 2>&1; apt-get -yq autoclean 2>&1; rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED || true" ;;
ubuntu | debian | devuan) pct exec "$container" -- bash -c "apt-get update 2>/dev/null | grep 'packages.*upgraded'; apt list --upgradable 2>/dev/null | cat && apt-get -yq dist-upgrade 2>&1; rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED || true" ;;
opensuse) pct exec "$container" -- bash -c "zypper ref && zypper --non-interactive dup" ;;
esac
}