#!/usr/bin/env bash # # ship ... # # lint, bild, test, and push one or more targets. if no targets are supplied, # ship everything we know how to ship ## set -eu stuff=("${@}") if [[ ${#stuff[@]} -eq 0 ]] then mapfile -t stuff < <(fd -t l . "$CODEROOT/_/nix/" \ | sed "s,$CODEROOT/_/nix/,,g" \ | fzf --multi --prompt="ship _/nix/" \ --preview="file $CODEROOT/_/nix/{}" \ --preview-window=bottom,wrap ) fi lint "${stuff[@]}" bild --test "${stuff[@]}" for thing in "${stuff[@]}" do push.sh "$thing" done ##