1 コミット

作成者 SHA1 メッセージ 日付
d2d366fb02 Fix _installPackage function 2020-04-15 11:27:30 -04:00

ファイルの表示

@@ -245,7 +245,7 @@ EOF
# parse commands
for _pkg in "$@"; do
# Clean up package name and handle OS-specific tweaks
_packageOverrides "$_pkg"
_pkg=$(_packageOverrides "$_pkg")
# Insert the package name to test if already installed
if [[ "$_pkg" != "" ]] && ! "${_pkg_query_cmd[@]}" "$_pkg" > /dev/null 2>&1; then
if [[ -n $_url_pkg ]]; then
@@ -256,6 +256,11 @@ EOF
fi
done
if [[ -n $_debug ]]; then
echo "_url_pkg_array: " "${_url_pkg_array[@]}"
echo "_pkg_array: " "${_pkg_array[@]}"
fi
if [[ ${#_pkg_array[@]} -ge 1 ]]; then
echo "Installing: " "${_pkg_array[@]}"
"${_install_cmd[@]}" "${_pkg_array[@]}" > /dev/null 2>&1
@@ -273,23 +278,23 @@ EOF
unset _url_pkg
if [[ "$1" == "rpm-build" && "$ID" =~ ^(ubuntu|debian)$ ]]; then
_pkg="rpm"
echo "rpm"
elif [[ "$1" == "createrepo_c" && "$ID" =~ ^(ubuntu|debian)$ ]]; then
_pkg="createrepo"
echo "createrepo"
elif [[ "$1" == "rpmfusion-free-release" ]]; then
if [[ "$ID" == "fedora" ]]; then
_url_pkg="https://download1.rpmfusion.org/free/$ID/rpmfusion-free-release-$VERSION_ID.noarch.rpm"
_pkg="$1"
echo "$1"
elif [[ "$ID" == "centos" ]]; then
_url_pkg="https://download1.rpmfusion.org/free/el/rpmfusion-free-release-$VERSION_ID.noarch.rpm"
_pkg="$1"
echo "$1"
else
_pkg=""
echo ""
fi
elif [[ "$1" == "epel-release" && "$ID" != "centos" ]]; then
_pkg=""
echo ""
else
_pkg="$1"
echo "$1"
fi
}