Created
August 19, 2015 02:23
-
-
Save CNG/c129161d15ef315a1a31 to your computer and use it in GitHub Desktop.
Detect if file changed in source files
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
CURRENT_VERSION=`find /var/solr/data/wordpress/conf -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -f1 -d"."` | |
REPO_VERSION=`find /root/configs/var/solr/data/wordpress/conf -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -f1 -d"."` | |
if [ "$CURRENT_VERSION" -lt "$REPO_VERSION" ] | |
then | |
cp -a /root/configs/var/solr/data/wordpress/conf /var/solr/data/wordpress | |
service solr restart | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment