This repository has been archived on 2025-01-07. You can view files and clone it, but cannot push or open issues or pull requests.
opdavies.nvim/run

34 lines
535 B
Plaintext
Raw Normal View History

2024-07-06 11:02:25 +00:00
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
function build {
local profile="${1:-}"
echo ${#}
shift 1
nix build --json --no-link \
--print-build-logs ".#${profile}" "${@}"
}
function check {
nix flake check
}
function help {
printf "%s <task> [args]\n\nTasks:\n" "${0}"
compgen -A function | grep -v "^_" | cat -n
printf "\nExtended help:\n Each task has comments for general usage\n"
}
function update {
nix flake update
}
TIMEFORMAT=$'\nTask completed in %3lR'
time "${@:-help}"