check_submodules.sh (583B)
1 #!/usr/bin/env bash 2 3 here=$(dirname "$0") 4 test -n "$here" -a -d "$here" || exit 5 6 cd ${here}/../.. 7 8 git submodule init 9 git submodule update 10 11 function get_git_mtime { 12 if [ $# -eq 1 ]; then 13 git log --pretty=%at -n1 -- $1 14 else 15 git log --pretty=%ar -n1 -- $2 16 fi 17 } 18 19 fail=0 20 21 22 if [ $(date +%s -d "2 weeks ago") -gt $(get_git_mtime "contrib/deterministic-build/electrum-locale/") ]; then 23 echo "Last update from electrum-locale is older than 2 weeks."\ 24 "Please update it to incorporate the latest translations from crowdin." 25 fail=1 26 fi 27 28 exit ${fail}