File: apt-file.is-cache-empty

package info (click to toggle)
apt-file 3.3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 636 kB
  • sloc: perl: 907; sh: 93; makefile: 40
file content (10 lines) | stat: -rw-r--r-- 187 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh
# This script checks if the cache directory is empty

if apt-get indextargets --format '$(CREATED_BY)' | grep -q ^Contents- ; then
    # Not empty
    exit 1
fi
# Empty
exit 0