Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
11 changes: 8 additions & 3 deletions public/migrate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# Fedora to Ultramarine Linux migration script
# Lea's pro tip: Run this through shellcheck, it'll genuinely save so much time and effort

ver="0.1.4"
# Oldest repo we provide is um37
MINIMUM_RELEASEVER=37
ver="0.2.0"
# Oldest repo we provide is um41
MINIMUM_RELEASEVER=41
set -euo pipefail

trace() {
Expand All @@ -26,9 +26,14 @@ os_variant=$(grep -E '^VARIANT_ID=' /etc/os-release | sed -e 's/VARIANT_ID=//g';
# If the os_id is fedora and os_version is greater than or equal to MINIMUM_RELEASEVER, then permit upgrade, otherwise error
if [[ ${os_id} = "fedora" ]] && [[ ${os_version} -ge $MINIMUM_RELEASEVER ]]; then
: # do nothing
elif [[ ${os_id} = "fedora-asahi-remix" ]] && [[ ${os_version} -ge $MINIMUM_RELEASEVER ]]; then
: # do nothing
elif [[ ${os_id} = "fedora" ]] || [[ ${os_version} -lt $MINIMUM_RELEASEVER ]]; then
echo "This script is only for Fedora $MINIMUM_RELEASEVER or newer."
exit 1
elif [[ ${os_id} = "fedora-asahi-remix" ]] && [[ ${os_version} -ge $MINIMUM_RELEASEVER ]]; then
echo "This script is only for Fedora $MINIMUM_RELEASEVER or newer."
exit 1
elif [[ ${os_id} = "ultramarine" ]]; then
echo "You are already running Ultramarine Linux. Congratulations!"
exit 1
Expand Down