From 8c6876db6288c6ee7d7aad51865c3a2a6bdfb39f Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sun, 20 Oct 2013 23:58:04 +0100 Subject: [PATCH] Add dynamically generated copyright year via build script --- build.sh | 5 +++-- src/bin/dotify | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/build.sh b/build.sh index 0d95dbf..428aef5 100755 --- a/build.sh +++ b/build.sh @@ -45,8 +45,9 @@ output="" while IFS= read line; do if [[ "$line" == "#"* ]]; then - # Replace {{VERSION}} placeholder in comments. - line="${line/\{\{VERSION\}\}/$(dotify-version)}" + # Replace {{DOTIFY_VERSION}} placeholder in comments. + line="${line/\{\{DOTIFY_VERSION\}\}/$(dotify-version)}" + line="${line/\{\{COPYRIGHT_YEAR\}\}/$(date +"%Y")}" fi if [[ "$line" == "source \""*"\"" ]]; then diff --git a/src/bin/dotify b/src/bin/dotify index b34b7ac..d15453a 100755 --- a/src/bin/dotify +++ b/src/bin/dotify @@ -3,10 +3,10 @@ set -e shopt -s extglob [ -n "$DOTIFY_DEBUG" ] && set -x -# dotify {{VERSION}} +# dotify {{DOTIFY_VERSION}} # https://github.com/jimeh/dotify # -# Copyright (c) 2013 Jim Myhrberg. +# Copyright (c) {{COPYRIGHT_YEAR}} Jim Myhrberg. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to