#!/bin/bash # This script is executed by make in the parent directory [ "$HOSTNAME" != lime2 ] || exit 1 echo -n "Pulling cours... " origin_file_time=$(stat -c %Y ~/tssr/cours/cours*.pdf) current_file_time=$(stat -c %Y ./cours.pdf) if [ "$origin_file_time" -gt "$current_file_time" ]; then cp ~/tssr/cours/cours*.pdf ./cours.pdf && echo "Done" else echo "Already up to date" fi