|
Packit |
98cdb6 |
#!/bin/sh
|
|
Packit |
98cdb6 |
|
|
Packit |
98cdb6 |
|
|
Packit |
98cdb6 |
copyright_glib ()
|
|
Packit |
98cdb6 |
{
|
|
Packit |
98cdb6 |
cat << EOF
|
|
Packit |
98cdb6 |
/* GLIB - Library of useful routines for C programming
|
|
Packit |
98cdb6 |
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
|
Packit |
98cdb6 |
*
|
|
Packit |
98cdb6 |
* This library is free software; you can redistribute it and/or
|
|
Packit |
98cdb6 |
* modify it under the terms of the GNU Library General Public
|
|
Packit |
98cdb6 |
* License as published by the Free Software Foundation; either
|
|
Packit |
98cdb6 |
* version 2 of the License, or (at your option) any later version.
|
|
Packit |
98cdb6 |
*
|
|
Packit |
98cdb6 |
* This library is distributed in the hope that it will be useful,
|
|
Packit |
98cdb6 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
98cdb6 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
98cdb6 |
* Library General Public License for more details.
|
|
Packit |
98cdb6 |
*
|
|
Packit |
98cdb6 |
* You should have received a copy of the GNU Library General Public
|
|
Packit |
98cdb6 |
* License along with this library; if not, write to the
|
|
Packit |
98cdb6 |
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
Packit |
98cdb6 |
* Boston, MA 02111-1307, USA.
|
|
Packit |
98cdb6 |
*/
|
|
Packit |
98cdb6 |
EOF
|
|
Packit |
98cdb6 |
}
|
|
Packit |
98cdb6 |
|
|
Packit |
98cdb6 |
copyright_gdk ()
|
|
Packit |
98cdb6 |
{
|
|
Packit |
98cdb6 |
cat << EOF
|
|
Packit |
98cdb6 |
/* GDK - The GIMP Drawing Kit
|
|
Packit |
98cdb6 |
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
|
Packit |
98cdb6 |
*
|
|
Packit |
98cdb6 |
* This library is free software; you can redistribute it and/or
|
|
Packit |
98cdb6 |
* modify it under the terms of the GNU Library General Public
|
|
Packit |
98cdb6 |
* License as published by the Free Software Foundation; either
|
|
Packit |
98cdb6 |
* version 2 of the License, or (at your option) any later version.
|
|
Packit |
98cdb6 |
*
|
|
Packit |
98cdb6 |
* This library is distributed in the hope that it will be useful,
|
|
Packit |
98cdb6 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
98cdb6 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
98cdb6 |
* Library General Public License for more details.
|
|
Packit |
98cdb6 |
*
|
|
Packit |
98cdb6 |
* You should have received a copy of the GNU Library General Public
|
|
Packit |
98cdb6 |
* License along with this library; if not, write to the
|
|
Packit |
98cdb6 |
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
Packit |
98cdb6 |
* Boston, MA 02111-1307, USA.
|
|
Packit |
98cdb6 |
*/
|
|
Packit |
98cdb6 |
EOF
|
|
Packit |
98cdb6 |
}
|
|
Packit |
98cdb6 |
|
|
Packit |
98cdb6 |
copyright_gtk ()
|
|
Packit |
98cdb6 |
{
|
|
Packit |
98cdb6 |
cat << EOF
|
|
Packit |
98cdb6 |
/* GTK - The GIMP Toolkit
|
|
Packit |
98cdb6 |
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
|
Packit |
98cdb6 |
*
|
|
Packit |
98cdb6 |
* This library is free software; you can redistribute it and/or
|
|
Packit |
98cdb6 |
* modify it under the terms of the GNU Library General Public
|
|
Packit |
98cdb6 |
* License as published by the Free Software Foundation; either
|
|
Packit |
98cdb6 |
* version 2 of the License, or (at your option) any later version.
|
|
Packit |
98cdb6 |
*
|
|
Packit |
98cdb6 |
* This library is distributed in the hope that it will be useful,
|
|
Packit |
98cdb6 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
98cdb6 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
98cdb6 |
* Library General Public License for more details.
|
|
Packit |
98cdb6 |
*
|
|
Packit |
98cdb6 |
* You should have received a copy of the GNU Library General Public
|
|
Packit |
98cdb6 |
* License along with this library; if not, write to the
|
|
Packit |
98cdb6 |
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
Packit |
98cdb6 |
* Boston, MA 02111-1307, USA.
|
|
Packit |
98cdb6 |
*/
|
|
Packit |
98cdb6 |
EOF
|
|
Packit |
98cdb6 |
}
|
|
Packit |
98cdb6 |
|
|
Packit |
98cdb6 |
copyright_interp ()
|
|
Packit |
98cdb6 |
{
|
|
Packit |
98cdb6 |
cat << EOF
|
|
Packit |
98cdb6 |
/* GTK Interp - The GTK Interpreter
|
|
Packit |
98cdb6 |
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
|
Packit |
98cdb6 |
*
|
|
Packit |
98cdb6 |
* This library is free software; you can redistribute it and/or
|
|
Packit |
98cdb6 |
* modify it under the terms of the GNU Library General Public
|
|
Packit |
98cdb6 |
* License as published by the Free Software Foundation; either
|
|
Packit |
98cdb6 |
* version 2 of the License, or (at your option) any later version.
|
|
Packit |
98cdb6 |
*
|
|
Packit |
98cdb6 |
* This library is distributed in the hope that it will be useful,
|
|
Packit |
98cdb6 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
98cdb6 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
98cdb6 |
* Library General Public License for more details.
|
|
Packit |
98cdb6 |
*
|
|
Packit |
98cdb6 |
* You should have received a copy of the GNU Library General Public
|
|
Packit |
98cdb6 |
* License along with this library; if not, write to the
|
|
Packit |
98cdb6 |
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
Packit |
98cdb6 |
* Boston, MA 02111-1307, USA.
|
|
Packit |
98cdb6 |
*/
|
|
Packit |
98cdb6 |
EOF
|
|
Packit |
98cdb6 |
}
|
|
Packit |
98cdb6 |
|
|
Packit |
98cdb6 |
|
|
Packit |
98cdb6 |
exclude_files="./glib/gconfig.h"
|
|
Packit |
98cdb6 |
|
|
Packit |
98cdb6 |
for file in `find . -name "*.[ch]" -print`; do
|
|
Packit |
98cdb6 |
exclude=`echo $exclude_files | grep $file`
|
|
Packit |
98cdb6 |
|
|
Packit |
98cdb6 |
if test "x$exclude" = "x"; then
|
|
Packit |
98cdb6 |
dir=`dirname $file`
|
|
Packit |
98cdb6 |
if test "x$dir" != "x."; then
|
|
Packit |
98cdb6 |
subdir=`basename $dir`
|
|
Packit |
98cdb6 |
|
|
Packit |
98cdb6 |
grepout=`grep Copyright $file`
|
|
Packit |
98cdb6 |
if test "x$grepout" = "x"; then
|
|
Packit |
98cdb6 |
backup_dir="$dir/bak"
|
|
Packit |
98cdb6 |
if test ! -d $backup_dir; then
|
|
Packit |
98cdb6 |
echo "making directory: $backup_dir"
|
|
Packit |
98cdb6 |
mkdir $backup_dir
|
|
Packit |
98cdb6 |
fi
|
|
Packit |
98cdb6 |
|
|
Packit |
98cdb6 |
echo $file
|
|
Packit |
98cdb6 |
|
|
Packit |
98cdb6 |
filename=`basename $file`
|
|
Packit |
98cdb6 |
cp $file $backup_dir/$filename
|
|
Packit |
98cdb6 |
copyright_$subdir > $file
|
|
Packit |
98cdb6 |
cat $backup_dir/$filename >> $file
|
|
Packit |
98cdb6 |
fi
|
|
Packit |
98cdb6 |
fi
|
|
Packit |
98cdb6 |
fi
|
|
Packit |
98cdb6 |
done
|