Created
October 26, 2018 18:08
-
-
Save deadc/1846a502a737fc61956c65e93b4d4bd0 to your computer and use it in GitHub Desktop.
Get last directory modified based on last commit
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
#!/bin/bash | |
set -e | |
FOLDER=$1 | |
LATEST_COMMIT=$(git rev-parse HEAD) | |
FOLDER_COMMIT=$(git log -1 --format=format:%H --full-diff ${FOLDER}) | |
[[ ${FOLDER_COMMIT} = ${LATEST_COMMIT} ]] && exit 0 || exit 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment