8 Incheckningar

Upphovsman SHA1 Meddelande Datum
9dcb6d690f 1.6.4 release 2025-04-26 11:34:43 -04:00
44c9d3217a Add temp repos to Debian too 2025-04-26 11:21:49 -04:00
7e75672bcc Add temp repos to Debian too 2025-04-26 11:17:41 -04:00
a8ab51bf81 Add temp repos to Debian too 2025-04-26 11:14:34 -04:00
b0b6556825 Only create .jriver 2025-04-26 10:56:17 -04:00
6406ca564a If VERSION_ID is empty, treat as new 2025-04-26 10:48:14 -04:00
ffa3dea4b9 Revert Keep container 2025-04-25 02:31:39 -04:00
d5865d8dba Keep container 2025-04-25 02:30:25 -04:00

Visa fil

@@ -19,7 +19,7 @@
# * Avoid execute() for stdout
shopt -s extglob
declare -g SCRIPT_VERSION="1.6.3"
declare -g SCRIPT_VERSION="1.6.4"
declare -g MC_VERSION="33.0.72" # do find all replace
declare -g MC_REPO="bullseye" # should match the MC_VERSION
# declare -g MC_REPO="bookworm" # should match the MC_VERSION
@@ -621,8 +621,8 @@ install_mc_repo() {
[[ -n $BETAPASS ]] && channel="beta" || channel="latest"
local major_version="${VERSION_ID%%.*}"
local keyfile="/usr/share/keyrings/jriver-com-archive-keyring.gpg"
if [[ $ID == "ubuntu" && $major_version -ge 24 ]] ||
[[ $ID == "debian" && $major_version -ge 12 ]]; then
if [[ ($ID == "ubuntu" && $major_version -ge 24) ||
($ID == "debian" && (-z $major_version || $major_version -ge 12)) ]]; then
if [[ $channel == "beta" ]]; then
repo_file="/etc/apt/sources.list.d/jriver-beta.sources"
else
@@ -961,25 +961,42 @@ install_mc_deb() {
execute rm -rf "$extract_dir"
fi
# On Ubuntu 24.04+, add jammy repos for libwebkit2gtk-4.0-37
local -i remove_jammy=0
# Helper function to add repository
add_temp_repo() {
local repo_name="$1"
local repo_uri="$2"
local repo_suite="$3"
local repo_key="$4"
declare -g TEMP_REPO_FILE="/etc/apt/sources.list.d/${repo_name}.sources"
echo "Creating temporary repository file $TEMP_REPO_FILE for $repo_suite"
sudo bash -c "cat <<-EOF > $TEMP_REPO_FILE
Types: deb
URIs: $repo_uri
Suites: $repo_suite
Components: main
Architectures: $MC_ARCH
Signed-By: $repo_key
EOF"
"${PKG_UPDATE[@]}" || { err "Package update failed!"; return 1; }
}
# Add older repository for libwebkit2gtk-4.0-37, etc, on newer Debian/Ubuntu
local -i remove_temp_repo=0
if [[ "$ID" == "ubuntu" ]]; then
local major_version="${VERSION_ID%%.*}"
local minor_version="${VERSION_ID##*.}"
if (( major_version > 24 || (major_version == 24 && minor_version >= 4) )); then
if [[ $major_version -gt 24 || ($major_version == 24 && minor_version -ge 4) ]]; then
echo "Temporarily adding jammy repository for libwebkit2gtk-4.0-37, etc."
local repo_file="/etc/apt/sources.list.d/jammy.sources"
echo "Creating repository file $repo_file for jammy"
sudo bash -c "cat <<-EOF > $repo_file
Types: deb
URIs: https://archive.ubuntu.com/ubuntu
Suites: jammy
Components: main
Architectures: $MC_ARCH
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
EOF"
"${PKG_UPDATE[@]}" || err "Package update failed!"
remove_jammy=1
remove_temp_repo=1
add_temp_repo "jammy" "https://archive.ubuntu.com/ubuntu" "jammy" "/usr/share/keyrings/ubuntu-archive-keyring.gpg"
fi
elif [[ "$ID" == "debian" ]]; then
local major_version="${VERSION_ID%%.*}"
if [[ $major_version -ge 13 || -z $major_version ]]; then
echo "Temporarily adding bookworm repository for libwebkit2gtk-4.0-37, etc."
remove_temp_repo=1
add_temp_repo "bookworm" "https://deb.debian.org/debian" "bookworm" "/usr/share/keyrings/debian-archive-keyring.gpg"
fi
fi
@@ -992,19 +1009,21 @@ install_mc_deb() {
# Use --reinstall to make sure local package is installed over repo package
if ! install_package \
--no-install-check \
--no-gpg-check \
--allow-downgrades \
--reinstall \
"$temp_deb"; then
--no-install-check \
--no-gpg-check \
--allow-downgrades \
--reinstall \
"$temp_deb"; then
err "Local MC DEB installation failed"
((remove_jammy)) && { echo "Removing jammy repo"; execute sudo rm -f "$repo_file"; }
((remove_temp_repo)) && { echo "Removing temporary repo"; execute sudo rm -f "$TEMP_REPO_FILE"; }
if ask_ok "Remove source DEB and retry"; then
execute sudo rm -f "$MC_DEB" "$temp_deb"
exec "$SCRIPT_PATH" "$@" "--no-update"
fi
fi
((remove_jammy)) && { echo "Removing jammy repo"; execute sudo rm -f "$repo_file"; }
# Cleanup temporary repository and temporary DEB file
((remove_temp_repo)) && { echo "Removing temporary repo"; execute sudo rm -f "$TEMP_REPO_FILE"; }
execute sudo rm -f "$temp_deb"
}
@@ -1546,7 +1565,7 @@ disable_btrfs_cow() {
local mc_user_path="$HOME/.jriver"
for dir in "$MC_ROOT" "$mc_user_path"; do
[[ -d $dir ]] || execute mkdir -p "$dir"
[[ -d $mc_user_path ]] || execute mkdir -p "$mc_user_path"
if [[ $(stat -f -c %T "$dir") == "btrfs" ]] &&
! lsattr -d "$dir" | cut -f1 -d" " | grep -q C &&
execute sudo chattr +C "$dir"; then