Created
November 6, 2020 19:03
-
-
Save nmrshll/c0f241604f18d1ef0d16c4d50fe54464 to your computer and use it in GitHub Desktop.
This file contains 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
# hash a dir | |
code_sha=$(shell echo $(shell find substrate-node-template -path "*target" -prune -type f -o -exec echo {} \; | xargs -I "{}" date -r {} "+%s") | $(shell [[ `uname`="Darwin" ]] &&echo "shasum -a 256" ||echo sha256sum) | cut -d" " -f1) | |
# get a dir's last modified timestamp | |
# ?rebuild=[[ $(shell date -r ${node} "+%s" || echo 0) -lt $(shell find substrate-node-template -print0 | xargs -0 -I "{}" date -r {} "+%s" | sort -nr | head -1 || echo 0) ]] # macos only |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment