cdist/cdist/conf/type/__package_apt/explorer/index

10 lines
290 B
Text
Raw Normal View History

2021-11-01 20:50:31 +00:00
#!/bin/sh -e
if [ ! -d /var/lib/apt/lists ] \
|| [ -n "$( find /etc/apt -mindepth 1 -cnewer /var/lib/apt/lists )" ] \
|| [ ! -f /var/cache/apt/pkgcache.bin ] \
|| [ "$( stat --format %Y /var/cache/apt/pkgcache.bin )" -lt "$( date +%s -d '-1 day' )" ]
then
echo 'update'
fi