Сборка wtf, или Когда make не в почете.

    Date: 09/25/07 (Code WTF)    Keywords: no keywords

    #!/bin/bash
    ...
    outputfile=".cpout"
    SourceFiles=`find . -name "*.hpp" -o -name "*.cpp" -o -name "*.c" -o -name "*.h"`
    IncludedFiles=`grep ^#include ${SourceFiles} | cut -f2- -d: | cut -f2- -d" " | grep -v "/\*\*/" | cut -f2 -d\" | cut -f1 -d\> | cut -f2- -d\< | sed "s/.*\///"|sort | sort -um`
    Subdirs=`ls -p | grep /`
    for Subdir in $Subdirs
    do
            mkdir -p ${INCLUDE_DIR}/$Subdir
            for File in $IncludedFiles
            do
                    cp -p $Subdir/$File ${INCLUDE_DIR}/$Subdir >& $outputfile
            done
    done
    rm -f $outputfile
    ...

    (флаг -e aka exit-on-error не установлен)

    Source: http://community.livejournal.com/code_wtf/105061.html

« Проверки || Фильтруем... »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home