yammer/yam — pull request #16 by jessieay (2013-04-11 01:12:29+00:00)
Title: Add script to prepend license to all files

As per yam_python. Rough script copied below - adjust for the gem.

```

#!/usr/bin/env bash

# tools/add_license_header.sh

# Adds the license summary to the top of any .py file that is (1) tracked by
# git and (2) doesn't already have the header.

cd `git rev-parse --show-toplevel`

python_files=`git ls-files | grep '\.py$'`
copyright_line=`head -1 tools/license_header`

for f in `grep -L "$copyright_line" $python_files`
do
echo "Adding license header to $f"
dest="$f.with_header"
cat tools/license_header $f > $dest
mv $dest $f
done

# tools/license_header

# Copyright (c) Microsoft Corporation
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY
# IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR
# PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
#
# See the Apache Version 2.0 License for specific language governing
# permissions and limitations under the License.