From 6c93cb6b1157f87d9cf7f7f26c802c72049d408d Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 2 Jun 2025 07:52:13 +0200 Subject: [PATCH] ljdsalkjdaslkj --- justfile | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/justfile b/justfile index 3bc0c7d..ac980e8 100644 --- a/justfile +++ b/justfile @@ -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