From 6bd8785bde75df856ab6efde2041617571a59282 Mon Sep 17 00:00:00 2001 From: Rasmus Steinke Date: Sat, 27 Feb 2016 14:37:25 +0100 Subject: catch --update --- clerk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clerk b/clerk index 6fd40c5..f921e9e 100755 --- a/clerk +++ b/clerk @@ -201,7 +201,9 @@ updateCache () { exit fi } - +if [[ $1 == "--update" ]]; then + : +else date=$(mpc stats | grep 'DB Updated: ') file="$HOME/.config/clerk/.lastupdate" if [ "$(< $file)" = "$date" ] && [ -f "$file" ] ; then @@ -211,6 +213,7 @@ updateCache () { date=$(mpc stats | grep 'DB Updated: ') echo "${date}" > "${file}" fi +fi # Use GNU coreutils on OSX sed=$([[ "$OSTYPE" == "darwin"* ]] && echo 'gsed' || echo 'sed') -- cgit v1.2.3-24-g4f1b