ubuntu.sh takes Ubuntu 24.04 and its derivatives alone, since the DEB names 24.04's t64 libraries. nixos.sh installs the newest release's tag, not main. The release workflow refuses a tag that names another version than the build files, and runs on the Node 24 actions. DistortTests pins Swift's division by w past the horizon. Co-Authored-By: Claude <noreply@anthropic.com>
23 lines
712 B
Bash
Executable File
23 lines
712 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Installs OmaPhoto on NixOS from its flake.
|
|
set -euo pipefail
|
|
if ! command -v nix >/dev/null; then
|
|
echo "This script needs Nix; NixOS carries it." >&2
|
|
exit 1
|
|
fi
|
|
if [ "$(uname -m)" != x86_64 ]; then
|
|
echo "OmaPhoto's flake builds for x86_64 alone." >&2
|
|
exit 1
|
|
fi
|
|
# The newest release's tag, as GitHub redirects to it.
|
|
latest=$(curl -fsSLI --proto '=https' -o /dev/null -w '%{url_effective}' https://github.com/ZacharyZhang-NY/OmaPhoto/releases/latest)
|
|
tag=${latest##*/}
|
|
case "$tag" in
|
|
v[0-9]*) ;;
|
|
*)
|
|
echo "No release found at $latest." >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
nix --extra-experimental-features "nix-command flakes" profile install "github:ZacharyZhang-NY/OmaPhoto/$tag"
|