update script: allow only updating pkgs

This commit is contained in:
NullBite 2024-11-19 16:56:16 -05:00
parent e026e133ed
commit 9d4e81fffc
Signed by: nullbite
GPG Key ID: 6C4D545385D4925A

@ -3,8 +3,24 @@
set -Eeuxo pipefail
if [[ "$#" -ne 0 ]] ; then
until [[ "$#" -le 0 ]]; do
case "$1" in
pkgs|packages) DO_PACKAGES=1;;
flake) DO_FLAKE=1;;
esac
shift
done
else
DO_PACKAGES=1
DO_FLAKE=1
fi
cd "$(dirname "$0")"
nix flake update
nix-update --flake redlib --version=branch=main
[[ -n "${DO_FLAKE:+x}" ]] && nix flake update || true
if [[ -n "${DO_PACKAGES:+x}" ]] ; then
nix-update --flake redlib --version=branch=main
fi