20 lines
472 B
Bash
Executable file
20 lines
472 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# This script is executed by make in the parent directory
|
|
|
|
[ "$HOSTNAME" != lime2 ] || exit 1
|
|
|
|
if [ "$VERBOSE" = true ]; then
|
|
echo -n "Pulling cours... "
|
|
fi
|
|
|
|
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 "Updated cours"
|
|
else
|
|
if [ "$VERBOSE" = true ]; then
|
|
echo "Already up to date"
|
|
fi
|
|
fi
|