Generalize ~show-files-to-be-deleted~

Signed-off-by: MagicRB <richard@brezak.sk>
This commit is contained in:
MagicRB 2023-10-03 23:52:45 +02:00
parent d9161d3b7d
commit 9ed801aecf
No known key found for this signature in database
GPG key ID: 08D5287CC5DDCA0E

View file

@ -3,8 +3,14 @@
flake.overlays.show-files-to-be-deleted = flake.overlays.show-files-to-be-deleted =
final: prev: { final: prev: {
show-files-to-be-deleted = final.writeShellScriptBin "show-files-to-be-deleted" '' show-files-to-be-deleted = final.writeShellScriptBin "show-files-to-be-deleted" ''
[ $(id -u) == 0 ] || exec sudo $0 if [[ "$#" != "1" ]] ; then
find / -mount -type f echo "Invalid number ($#) of argumets, one expected."
exit 1
fi
_mount_point="$1"
find "$1" -mount -type f
''; '';
}; };
} }