1
0
mirror of https://github.com/ovh/php-ovh.git synced 2023-11-05 03:20:26 +01:00
php-ovh/scripts/update-copyright.sh

15 lines
479 B
Bash
Raw Normal View History

#!/bin/bash
#
# Usage: ./scripts/update-copyright.sh
#
PCRE_MATCH_COPYRIGHT="Copyright \(c\) 2013-[0-9]{4}, OVH SAS."
PCRE_MATCH_DEBIAN="Copyright: [-0-9]* OVH SAS"
YEAR=$(date +%Y)
echo -n "Updating copyright headers to ${YEAR}... "
grep -rPl "${PCRE_MATCH_COPYRIGHT}" | xargs sed -ri "s/${PCRE_MATCH_COPYRIGHT}/Copyright (c) 2013-${YEAR}, OVH SAS./g"
grep -rPl "${PCRE_MATCH_DEBIAN}" | xargs sed -ri "s/${PCRE_MATCH_DEBIAN}/Copyright: 2013-${YEAR} OVH SAS/g"
echo "[OK]"