Blame makecopyright

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