diff options
author | P. J. McDermott <pj@pehjota.net> | 2014-05-01 13:59:43 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2014-05-01 13:59:43 (EDT) |
commit | a53d93fa4253a0f50db92936d6af11ae04f67a2a (patch) | |
tree | 3127e31dd9f999359721e40088d44e03e15b6999 /lib | |
parent | 23e67f2bc56568b150fdd439b4aef3ed024e6bfb (diff) |
collect_garbage(): Use file input, not heredoc.
This fixes garbage collection.
Before:
$ pro-archman -v -b proteanos process-incoming
pro-archman: Processing changes in incoming...
pro-archman: Updating feeds...
pro-archman: Collecting garbage...
pro-archman: Deleting file ...
rm: cannot remove ‘proteanos/’: Is a directory
pro-archman: 52: [: Illegal number: proteanos/.db/garbage/1398956970
pro-archman: Deleting file ...
rm: cannot remove ‘proteanos/’: Is a directory
pro-archman: 52: [: Illegal number: proteanos/.db/garbage/1398956971
After:
$ pro-archman -v -b proteanos process-incoming
pro-archman: Processing changes in incoming...
pro-archman: Updating feeds...
pro-archman: Collecting garbage...
pro-archman: Deleting file pool/o/opkg/libopkg.1-dev_0.2.0-1_all_all.opk...
pro-archman: Deleting file pool/o/opkg/opkg-doc_0.2.0-1_all_all.opk...
pro-archman: Deleting file pool/o/opkg/libopkg.1_0.2.0-1_amd64-linux-glibc_all.opk...
pro-archman: Deleting file pool/o/opkg/opkg-dbg_0.2.0-1_amd64-linux-glibc_all.opk...
pro-archman: Deleting file pool/o/opkg/opkg_0.2.0-1_amd64-linux-glibc_all.opk...
pro-archman: Deleting file pool/o/opkg/_0.2.2-1_all_all.opk...
pro-archman: Deleting file pool/o/opkg/_0.2.2-1_amd64-linux-glibc_all.opk...
pro-archman: Deleting file pool/o/opkg/libopkg.1_0.2.0-1_i686-linux-glibc_all.opk...
pro-archman: Deleting file pool/o/opkg/opkg-dbg_0.2.0-1_i686-linux-glibc_all.opk...
pro-archman: Deleting file pool/o/opkg/opkg_0.2.0-1_i686-linux-glibc_all.opk...
pro-archman: Deleting file pool/o/opkg/src-opkg_0.2.0-1_src_all.opk...
Diffstat (limited to 'lib')
-rw-r--r-- | lib/garbage.sh | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/garbage.sh b/lib/garbage.sh index 3a0ca97..a6f1a3d 100644 --- a/lib/garbage.sh +++ b/lib/garbage.sh @@ -54,9 +54,7 @@ collect_garbage() try_rmdir "${base_dir}/${file}" dirs=$(($dirs - 1)) done - done <<-EOF - ${garbage} - EOF + done <"${garbage}" rm -f "${garbage}" done } |