tunuifranken.info/bin/pull-cv.sh

30 lines
937 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 2>/dev/null || updated=true
diff ~/src/html-cv/data/cv-photo ./cv/data/cv-photo 2>/dev/null || updated=true
diff ~/src/html-cv/data/internet-icon.png ./cv/data/internet-icon.png 2>/dev/null || updated=true
diff ~/src/html-cv/data/git-icon.png ./cv/data/git-icon.png 2>/dev/null || updated=true
diff -r ~/src/html-cv/css ./cv/css 2>/dev/null || 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