forked from ungleich-public/cdist
10 lines
290 B
Text
10 lines
290 B
Text
|
#!/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
|