mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-22 08:04:20 +01:00
Generalize ~show-files-to-be-deleted~
Signed-off-by: MagicRB <richard@brezak.sk>
This commit is contained in:
parent
d9161d3b7d
commit
9ed801aecf
|
@ -3,8 +3,14 @@
|
|||
flake.overlays.show-files-to-be-deleted =
|
||||
final: prev: {
|
||||
show-files-to-be-deleted = final.writeShellScriptBin "show-files-to-be-deleted" ''
|
||||
[ $(id -u) == 0 ] || exec sudo $0
|
||||
find / -mount -type f
|
||||
if [[ "$#" != "1" ]] ; then
|
||||
echo "Invalid number ($#) of argumets, one expected."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
_mount_point="$1"
|
||||
|
||||
find "$1" -mount -type f
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue