修改离线脚本

This commit is contained in:
Tian jianyong 2024-12-19 19:30:16 +08:00
parent f79dc9e22b
commit cc5488b1d3

View File

@ -129,7 +129,10 @@ for pkg in "${PACKAGES[@]}"; do
log_info "Checking dependencies for $pkg..."
if [[ "$pkg" == @* ]]; then
# Handle package groups
yum groupinfo "${pkg#@}" | grep "Mandatory Packages:" -A 100 | grep "^[[:space:]]*[^[:space:]]*" >> "$TEMP_PKGS"
# Remove '+' prefix and leading/trailing whitespace from package names
yum groupinfo "${pkg#@}" | grep "Mandatory Packages:" -A 100 | \
grep "^[[:space:]]*[^[:space:]]*" | \
sed 's/^[[:space:]]*+*//;s/[[:space:]]*$//' >> "$TEMP_PKGS"
else
echo "$pkg" >> "$TEMP_PKGS"
get_dependencies "$pkg" >> "$TEMP_PKGS"