From c356bd33ace8ab682adef0469c163997f0d1c498 Mon Sep 17 00:00:00 2001 From: Johannes Bauer Date: Thu, 22 Sep 2016 20:48:11 +0200 Subject: [PATCH] Script to add LICENSE headers to all files --- licensify | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 licensify diff --git a/licensify b/licensify new file mode 100755 index 0000000..ac42b20 --- /dev/null +++ b/licensify @@ -0,0 +1,18 @@ +#!/bin/bash +# +# + +for FILENAME in $*; do + if [ ! -f "$FILENAME" ]; then + continue + fi + echo -n "${FILENAME}..." + grep "This file is part of luksrku" "$FILENAME" >/dev/null 2>&1 + if [ "$?" == "0" ]; then + echo "Already tagged." + else + cat LICENSE-header "${FILENAME}" >tmp + mv tmp "${FILENAME}" + echo "Tagged!" + fi +done