Created
August 23, 2014 01:14
-
-
Save ccfontes/de2347b9e5ef31b8e760 to your computer and use it in GitHub Desktop.
Verifies if the Clojurescript sources were modified since last build.
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
#!/usr/bin/env hy | |
; Author: <Carlos C. Fontes> [email protected] | |
(defn cljs-modified? | |
"""Verifies if the Clojurescript sources were modified since last build.""" | |
[] | |
(let [ls-by-time-modified (partial ls "-t")] | |
(-> (glob "src-cljs/app/*.cljs") | |
(ls-by-time-modified "resources/public/js/main.js") | |
.split | |
first | |
(.split ".") | |
.pop | |
(= "cljs")))) | |
(if-not (cljs-modified?) | |
(sys.exit 1)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment