Run package update after adding jammy
This commit is contained in:
19
installJRMC
19
installJRMC
@@ -669,10 +669,7 @@ install_mc_repo() {
|
|||||||
debug "repo_text: $repo_text"
|
debug "repo_text: $repo_text"
|
||||||
sudo tee "$repo_file" &>/dev/null <<< "$repo_text"
|
sudo tee "$repo_file" &>/dev/null <<< "$repo_text"
|
||||||
|
|
||||||
if ! "${PKG_UPDATE[@]}"; then
|
"${PKG_UPDATE[@]}" || { err "Package update failed!"; return 1; }
|
||||||
err "Package update failed!"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! install_package \
|
if ! install_package \
|
||||||
--no-install-check \
|
--no-install-check \
|
||||||
@@ -1019,20 +1016,20 @@ install_mc_deb() {
|
|||||||
|
|
||||||
# On Ubuntu 24.04+, add jammy repos for libwebkit2gtk-4.0-37
|
# On Ubuntu 24.04+, add jammy repos for libwebkit2gtk-4.0-37
|
||||||
if [[ "$ID" == "ubuntu" ]]; then
|
if [[ "$ID" == "ubuntu" ]]; then
|
||||||
major_version="${VERSION_ID%%.*}"
|
local major_version="${VERSION_ID%%.*}"
|
||||||
minor_version="${VERSION_ID##*.}"
|
local minor_version="${VERSION_ID##*.}"
|
||||||
if (( major_version > 24 || (major_version == 24 && minor_version >= 4) )); then
|
if (( major_version > 24 || (major_version == 24 && minor_version >= 4) )); then
|
||||||
repo_file="/etc/apt/sources.list.d/jammy.sources"
|
local repo_file="/etc/apt/sources.list.d/jammy.sources"
|
||||||
read -r -d '' repo_text <<-EOF
|
echo "Creating repository file $repo_file for jammy"
|
||||||
|
sudo bash -c "cat <<-EOF > $repo_file
|
||||||
Types: deb
|
Types: deb
|
||||||
URIs: https://archive.ubuntu.com/ubuntu
|
URIs: https://archive.ubuntu.com/ubuntu
|
||||||
Suites: jammy
|
Suites: jammy
|
||||||
Components: main
|
Components: main
|
||||||
Architectures: $MC_ARCH
|
Architectures: $MC_ARCH
|
||||||
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
|
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
|
||||||
EOF
|
EOF"
|
||||||
echo "Creating repository file at $repo_file for jammy"
|
"${PKG_UPDATE[@]}" || err "Package update failed!"
|
||||||
sudo tee "$repo_file" >/dev/null <<< "$repo_text"
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user