functions: changed pkginstalled() to use $* instead of "$@" when generating the pattern
[opensde-nopast.git] / bin / sde-patch-copyright
blobf0951b2f030afc40a84c406bb5ae46592f038a78
1 #!/bin/sh
2 # --- SDE-COPYRIGHT-NOTE-BEGIN ---
3 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
5 # Filename: bin/sde-patch-copyright
6 # Copyright (C) 2007 - 2008 The OpenSDE Project
8 # More information can be found in the files COPYING and README.
10 # This program is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; version 2 of the License. A copy of the
13 # GNU General Public License can be found in the file COPYING.
14 # --- SDE-COPYRIGHT-NOTE-END ---
16 [ -n "$SDEROOT" ] ||
17 export SDEROOT=$( cd "${0%/*}/.."; pwd -P )
19 . $SDEROOT/lib/libsde.in
21 patch_usage() {
22 local progname=${0##*/}
23 cat <<EOT
24 Usage: $progname [FILES...]
25 EOT
28 shortopts=
29 longopts=
30 options=$( getopt -o "$shortopts" -l "$longopts" -- "$@" )
31 if [ $? -ne 0 ]; then
32 list_usage
33 exit -1
36 # load new arguments list
37 eval set -- "$options"
39 while [ $# -gt 0 ]; do
40 case "$1" in
42 --) shift; break ;;
43 *) echo_abort 1 "Unknown argument '$1', aborting."
44 esac
45 shift
46 done
48 $SDEROOT/bin/sde-list-files -- "$@" | while read file; do
49 cd "$SDEROOT"
51 sh lib/sde-package/patch-copyright.sh "$file" | patch -p0
52 done