* Keep fewer old releases.
git-svn-id: https://nixos.org/repos/nix/release/trunk/channels@34728 70bd8c7a-acb8-0310-9f0d-9cc1c95dcdbb
This commit is contained in:
parent
e9f69209fc
commit
9b874ad1f6
|
@ -1,5 +1,7 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
trash=/data/releases/.trash
|
trash=/data/releases/.trash
|
||||||
mkdir -p $trash
|
mkdir -p $trash
|
||||||
|
|
||||||
|
@ -10,7 +12,7 @@ find /data/releases/nixos/ /data/releases/nixpkgs/ -maxdepth 1 -name ".tmp*" -mt
|
||||||
done
|
done
|
||||||
|
|
||||||
# Remove old NixOS releases.
|
# Remove old NixOS releases.
|
||||||
find /data/releases/nixos/ -maxdepth 1 -name "nixos-*pre*" -mtime +30 | sort | while read rel; do
|
find /data/releases/nixos/ -maxdepth 1 -name "nixos-*pre*" -mtime +20 | sort | while read rel; do
|
||||||
if [ -e $rel/keep ]; then
|
if [ -e $rel/keep ]; then
|
||||||
echo "keeping NixOS release $rel" >&2
|
echo "keeping NixOS release $rel" >&2
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in a new issue