Files
Nomarchy/bin/nomarchy-channel-set
Bernardo Magri 33deeb494b initial commit
2026-04-01 17:06:01 +01:00

32 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
# Set the Nomarchy channel, which dictates what git branch and package repository is used.
#
# Stable uses the master branch, which only sees updates on official releases, and
# the stable package repository, which typically lags the edge by a month to ensure
# better compatibility.
#
# Edge tracks the latest package repository, but still relies on the master branch,
# so new packages which require config changes may cause conflicts or errors.
#
# Dev tracks the active development dev branch, which may include partial or broken updates,
# as well as the latest package repository. This should only be used by Nomarchy developers
# and people with a lot of experience managing Linux systems.
if (($# == 0)); then
echo "Usage: nomarchy-channel-set [stable|rc|edge|dev]"
exit 1
else
channel="$1"
fi
case "$channel" in
"stable") nomarchy-branch-set "master" && nomarchy-refresh-pacman "stable" ;;
"rc") nomarchy-branch-set "rc" && nomarchy-refresh-pacman "rc" ;;
"edge") nomarchy-branch-set "master" && nomarchy-refresh-pacman "edge" ;;
"dev") nomarchy-branch-set "dev" && nomarchy-refresh-pacman "edge" ;;
*) echo "Unknown channel: $channel"; exit 1; ;;
esac
nomarchy-update -y