update/navibeat
 1#!/usr/bin/env bash
 2# Run passthru.updateScript-based package updates (see scripts/update.nix).
 3#
 4# Usage:
 5#   ./scripts/update-package <attr-path> [<attr-path>...]
 6#   ./scripts/update-package --all
 7#   ./scripts/update-package --list
 8set -euo pipefail
 9cd "$(dirname "$0")/.."
10
11case "${1:-}" in
12--all)
13	exec nix-shell scripts/update.nix --argstr packages ""
14	;;
15--list)
16	exec nix-instantiate --eval --json --strict \
17		-E 'map (p: p.attrPath) (import ./scripts/update-packages.nix {})'
18	;;
19"")
20	echo "Usage: $0 <attr-path>... | --all | --list" >&2
21	exit 1
22	;;
23*)
24	exec nix-shell scripts/update.nix --argstr packages "$*"
25	;;
26esac