Codebase list ponyprog / debian/3.1.1+ds-1 fixyear.sh
debian/3.1.1+ds-1

Tree @debian/3.1.1+ds-1 (Download .tar.gz)

fixyear.sh @debian/3.1.1+ds-1raw · history · blame

#!/bin/bash

set -o errexit

OLD_YEAR=2019
CURRENT_YEAR=`date +%Y`

FILESC=`find -name "*.cpp" -type f`
FILESH=`find -name "*.h" -type f`
FILES="${FILESC} ${FILESH} ponyprog.pro CMakeLists.txt distribution/innosetup/ponyprog.iss"

for i in ${FILES}
do
  if [ -f "${i}" ]; then
    echo "Converting ${i}"
    sed -i "s@1997-${OLD_YEAR}@1997-${CURRENT_YEAR}@g" "${i}"
  else
    echo "File non esiste: ${i}"
  fi
done

exit 0