]> mj.ucw.cz Git - libucw.git/blobdiff - build/install-includes
Doc: Documented growing arrays, generic allocators and related things
[libucw.git] / build / install-includes
index 1bf324834fd23e1fbdb61cbd4d6086cd710bfad7..f403fd3720ed84a33f943519bf12cfe4577b8325 100755 (executable)
@@ -1,16 +1,16 @@
 #!/bin/sh
 # A simple installer of include files
-# (c) 2005 Martin Mares <mj@ucw.cz>
+# (c) 2005--2007 Martin Mares <mj@ucw.cz>
 
 set -e
 SRC=$1
 DEST=$2
 shift 2
 while [ -n "$1" ] ; do
-       if [ "$SRC/$1" -nt "$DEST/$1" ] ; then
-               echo "Copying $SRC/$1 to $DEST/$1"
+       if [ ! -f "$DEST/$1" -o "$SRC/$1" -nt "$DEST/$1" ] ; then
+               echo "INC $SRC/$1 -> $DEST/$1"
                mkdir -p $DEST/`dirname $1`
-               cp $SRC/$1 $DEST/$1
+               sed -e 's/^\(#include[   ]*\)"\(.*\)"/\1<\2>/' <$SRC/$1 >$DEST/$1
        fi
        shift
 done