diff --git a/scripts/license.sh b/scripts/license.sh new file mode 100644 index 0000000..68ad039 --- /dev/null +++ b/scripts/license.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +YEAR=`cat LICENSE.txt | grep "^Copyright" | awk '{print $3}'` +NOW=`date '+%Y'` + +if [ $NOW -gt $YEAR ]; then + echo "Current year $NOW > $YEAR, updating license..." + LICENSE=`cat LICENSE.txt` + UPDATED=`echo "${LICENSE}" | sed "s/${YEAR}/${NOW}/"` + echo "${UPDATED}" > LICENSE.txt +fi +