mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 10:06:24 +05:00
27 lines
420 B
Bash
Executable File
27 lines
420 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# check for arguments
|
|
if [ $# -ne 1 ]
|
|
then
|
|
echo "Error in $0 - Invalid Argument Count"
|
|
echo "Syntax: $0 input_file - copyright header file"
|
|
exit
|
|
fi
|
|
|
|
# check for header file
|
|
infile=$1
|
|
if [ ! -f $infile ]
|
|
then
|
|
echo "Input file [$infile] not found - Aborting"
|
|
exit
|
|
fi
|
|
|
|
# inject header
|
|
for i in *.go
|
|
do
|
|
if ! grep -q Copyright $i
|
|
then
|
|
cat $infile $i >$i.new && mv $i.new $i
|
|
fi
|
|
done
|