mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-25 17:46:14 +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 =
|
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
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue