#!/bin/sh -e if [ ! -d /var/lib/apt/lists ] \ || [ -n "$( find /etc/apt -newer /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