tunuifranken.info/bin/pull-cv.sh

30 lines
957 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 CV... "
fi
updated=false
diff ~/src/html-cv/out.html ./cv/index.html >/dev/null 2>&1 || updated=true
diff ~/src/html-cv/data/cv-photo ./cv/data/cv-photo >/dev/null 2>&1 || updated=true
diff ~/src/html-cv/data/internet-icon.png ./cv/data/internet-icon.png >/dev/null 2>&1 || updated=true
diff ~/src/html-cv/data/git-icon.png ./cv/data/git-icon.png >/dev/null 2>&1 || updated=true
diff -r ~/src/html-cv/css ./cv/css >/dev/null 2>&1 || updated=true
cp ~/src/html-cv/out.html ./cv/index.html
cp ~/src/html-cv/data/cv-photo ./cv/data/cv-photo
cp ~/src/html-cv/data/internet-icon.png ./cv/data/internet-icon.png
cp ~/src/html-cv/data/git-icon.png ./cv/data/git-icon.png
cp -r ~/src/html-cv/css ./cv
if [ "$updated" = true ]; then
echo "Updated CV"
fi
if [ "$VERBOSE" = true ]; then
echo "Done"
fi