diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2018-04-06 14:19:29 +0200 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2018-04-06 14:19:29 +0200 |
| commit | a8d02267bcaeb90e9933b63c666bf693158da154 (patch) | |
| tree | 8e018850914cfe1191f1c798d41a70006137e593 | |
| parent | 04fe40544c0ef912bdd72a4146f88827eb3bf5f9 (diff) | |
| download | nixos-a8d02267bcaeb90e9933b63c666bf693158da154.tar nixos-a8d02267bcaeb90e9933b63c666bf693158da154.tar.gz nixos-a8d02267bcaeb90e9933b63c666bf693158da154.tar.bz2 nixos-a8d02267bcaeb90e9933b63c666bf693158da154.tar.xz nixos-a8d02267bcaeb90e9933b63c666bf693158da154.zip | |
…
| -rwxr-xr-x | odin/strm/cleanup_youtube | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/odin/strm/cleanup_youtube b/odin/strm/cleanup_youtube index 0df15d0b..694487a5 100755 --- a/odin/strm/cleanup_youtube +++ b/odin/strm/cleanup_youtube | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | function notmuch { | 3 | function notmuch { |
| 4 | while true; do | 4 | while true; do |
| 5 | result=$($_env NOTMUCH_CONFIG=${HOME}/.notmuch-rss-config @notmuch@/bin/notmuch "$@" 2>&1) | 5 | result=$(env NOTMUCH_CONFIG=${HOME}/.notmuch-rss-config @notmuch@/bin/notmuch "$@" 2>&1) |
| 6 | if ! [[ $result =~ "already locked" ]]; then | 6 | if ! [[ $result =~ "already locked" ]]; then |
| 7 | echo -nE $result | 7 | echo -nE $result |
| 8 | return | 8 | return |
| @@ -22,7 +22,7 @@ maxsize=$((1024 * 1024 * 1024 * 50)) | |||
| 22 | 22 | ||
| 23 | while [[ $(du -bs $dir | awk '{ print $1; }') -gt $maxsize ]]; do | 23 | while [[ $(du -bs $dir | awk '{ print $1; }') -gt $maxsize ]]; do |
| 24 | find $dir -type f -not -path $dir/CACHEDIR.TAG -print0 | \ | 24 | find $dir -type f -not -path $dir/CACHEDIR.TAG -print0 | \ |
| 25 | xargs -0 -- $_stat --printf '%W %Y %Z %X %n\0' | \ | 25 | xargs -0 -- stat --printf '%W %Y %Z %X %n\0' | \ |
| 26 | sort -t '\0' -z | \ | 26 | sort -t '\0' -z | \ |
| 27 | awk -F '\0' '{ gsub("^\\S+\\s+\\S+\\s+\\S+\\s+\\S+\\s+", "", $1); printf "%s\0", $1; }' | \ | 27 | awk -F '\0' '{ gsub("^\\S+\\s+\\S+\\s+\\S+\\s+\\S+\\s+", "", $1); printf "%s\0", $1; }' | \ |
| 28 | xargs -0 -- rm -v | 28 | xargs -0 -- rm -v |
