nix-files/pkgs/additional/sane-scripts/src/sane-find-dotfiles
Colin c50a4d1d71 static-nix-shell: fix mkBash scripts to actually be invokable from the CLI
they need the `bash` package! how did this work before?
2024-06-15 07:42:04 +00:00

12 lines
473 B
Plaintext
Executable File

#!/usr/bin/env nix-shell
#!nix-shell -i bash -p bash -p findutils
# find where a package stores its dotfiles/dotdir
# e.g. `sane-find-dotfiles foo` might print `/home/colin/.foo`, `/home/colin/.local/share/foo`, etc.
find ~/ -maxdepth 1 -iname "*$1*" -print
find ~/.local/share/*/ -maxdepth 1 -iname "*$1*" -print
find ~/.local/state/*/ -maxdepth 1 -iname "*$1*" -print
find ~/.config/*/ -maxdepth 1 -iname "*$1*" -print
find ~/.cache/*/ -maxdepth 1 -iname "*$1*" -print