summaryrefslogtreecommitdiff
path: root/odin/strm
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2018-04-06 14:19:29 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2018-04-06 14:19:29 +0200
commita8d02267bcaeb90e9933b63c666bf693158da154 (patch)
tree8e018850914cfe1191f1c798d41a70006137e593 /odin/strm
parent04fe40544c0ef912bdd72a4146f88827eb3bf5f9 (diff)
downloadnixos-a8d02267bcaeb90e9933b63c666bf693158da154.tar
nixos-a8d02267bcaeb90e9933b63c666bf693158da154.tar.gz
nixos-a8d02267bcaeb90e9933b63c666bf693158da154.tar.bz2
nixos-a8d02267bcaeb90e9933b63c666bf693158da154.tar.xz
nixos-a8d02267bcaeb90e9933b63c666bf693158da154.zip
Diffstat (limited to 'odin/strm')
-rwxr-xr-xodin/strm/cleanup_youtube4
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
3function notmuch { 3function 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
23while [[ $(du -bs $dir | awk '{ print $1; }') -gt $maxsize ]]; do 23while [[ $(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