#! /bin/sh # Copyright 2008 Laszlo Systems, Inc. All Rights Reserved. Use is subject to license terms. # Build the autoincludes properties file by scanning all the components for class definitions # Used by lps/components/build.xml (q.v.) output="${1}" sedcommands=`mktemp -t XXXXXX` # All this work to be able to type a single-quote cat > "${sedcommands}" < "${output}" echo '# This file is generated by the `ant autoincludes` task in the lps/components direcory' >> "${output}" date +'# Copyright %Y Laszlo Systems, Inc. All Rights Reserved. Use is subject to license terms.' >> "${output}" # This specifically excludes tags that start with uppercase letters as those appear to be internal (cd ${LPS_HOME}/lps/components; find . -name '*.lzx' -not -path '*/incubator/*' -not -path '*/queens-charts/*' -print0 | xargs -0 grep '<\(class\|interface\) ') | sed -n -f "${sedcommands}" | sort -t ':' -k 1 >> "${output}" dups=`cut -d ':' -f 1 "${output}" | uniq -d` if [ -n "${dups}" ]; then echo "Duplicate tags: ${dups}" exit -1 else echo "Remember to check in the new version of ${output}" exit 0 fi