#!/usr/bin/env bash
# SPDX-License-Identifier: GPL-3.0-or-later
#
# steamos-select-branch — answer Steam's OS update-channel queries.
#
# Steam runs `steamos-select-branch -c` (current) and `-l` (available)
# for Settings > System > OS Update Channel, and
# `steamos-polkit-helpers/steamos-select-branch <branch>` to switch.
# Fedora has no SteamOS image channels, so there is exactly one: stable.

set -u

case "${1:-}" in
    -c|-l)  echo "stable" ;;
    stable) ;;
    *)      echo "${0##*/}: only the stable channel exists on this system" >&2
            exit 1 ;;
esac
