stuf
This commit is contained in:
parent
78c1198d90
commit
fada7e988b
4 changed files with 24 additions and 6 deletions
|
|
@ -9,10 +9,10 @@ def ns [...packages: string] {
|
|||
# nix search nixpkgs $package
|
||||
# }
|
||||
|
||||
def --wrapped rebuild [subcommand, ...rest] {
|
||||
def --wrapped rebuild [--force, subcommand, ...rest] {
|
||||
if not (
|
||||
df -h | detect columns --guess | where "Mounted on" == "/" or "Mounted on" == "/boot" | get Use% | each {parse "{usage}%" | get usage | into int} | flatten | all {$in < 99}
|
||||
) {
|
||||
) and not $force {
|
||||
print "not enough disk space!"
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue