ljdsalkjdaslkj

This commit is contained in:
2025-06-02 07:52:13 +02:00
parent d7f8a9506a
commit 6c93cb6b11

View File

@@ -97,6 +97,18 @@ list-packages-fname-filtered *fnames:
| grep -v $'\t'pkgs/tools/package-management/akku/default.nix \
| grep -v $'\t'pkgs/tools/typesetting/tex/texlive/build-texlive-package.nix
list-packages-attrpath-filtered *attrpaths:
#!/usr/bin/env -S bash -euo pipefail
declare -a attrpaths=("$@")
if [[ "${#attrpaths[@]}" -gt 0 ]]; then
printf "%s\n" "${attrpaths[@]}" | just _list_packages_attrpath_filtered
elif [[ -t 0 ]]; then
fd . pkgs -enix -tf | fzf --reverse --multi | just _list_packages_attrpath_filtered
else
echo >&2 No args and no tty, reading from stdin...
just _list_packages_attrpath_filtered
fi
@_list_packages_attrpath_filtered:
tr '0123456789' '9876543210' | sort -u | tr '0123456789' '9876543210' \
| xargs {{XARGS_NL}} -n 2000 just __list_packages_attrpath_filtered
@@ -837,8 +849,9 @@ _mk_clean_list:
) | sort -u |
while IFS= read line; do
branch="$(cut <<<"$line" -c3-)"
if [[ "$branch" = "scratch" ]] \
|| grep <<<"$branch" "$(just _upstream_release_branches '^' '$')" --quiet; then
if [[ "$branch" = "master" ]] \
|| grep <<<"$branch" "$(just _upstream_release_branches '^' '$')" --quiet \
|| grep <<<"$branch" "$(just _upstream_release_branches '^upstream-' '$')" --quiet; then
continue
fi
#jq <<<"$worktrees" '.branch'
@@ -849,11 +862,14 @@ _mk_clean_list:
if [[ -n "$worktree" ]]; then
path="$(jq <<<"$worktree" .worktree -r )"
if [[ -d "$path" ]]; then
if [[ "$(realpath -m --relative-to=. "$path" | cut -d/ -f1)" = "upstream" ]]; then
continue
fi
if (
cd "$path"
! $GIT diff HEAD --quiet --exit-code >&/dev/null ||
$GIT ls-files --others --exclude-standard |
grep -qEv '^(update-executables\.txt|results(-.*)?|build\.nix|(asd|do|foo|test|spismeg|packages)[2-9]?\.(sh|txt|json)|diff\.patch|patch\.diff|(packages(_?[0-9]+))\.json|[^/]*\.log)$'
grep -qEv '^(update-executables\.txt|results(-.*)?|build\.nix|(asd|do|foo|test|spismeg|packages|notes)[2-9]?\.(sh|txt|json)|diff\.patch|patch\.diff|(packages(_?[0-9]+))\.json|[^/]*\.log)$'
) ; then
continue
fi