Last active
August 29, 2015 14:21
-
-
Save whitmo/bdbb52c22cd692bfecdf to your computer and use it in GitHub Desktop.
conditional update
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function conditional_apt_update(){ | |
if expr $(date +%s) - $(stat -c %Y /var/lib/apt/periodic/update-success-stamp) > $0 | |
then | |
echo HI | |
fi | |
} | |
conditional_apt_update 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Very nice 🍻