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