makespublic.sh 504 Bytes
Newer Older
COULAUD Olivier's avatar
COULAUD Olivier committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#!/bin/bash

# @SCALFMM_PRIVATE

if [ "$#" -ne 1 ]; then
    echo "Use current directory as source"
    here="."
else
    echo "Use first parameter as source"
    here=$1
fi    

echo "Makes the files included in $here and below public"

for ext in "cpp" "hpp" "h" "c" ; do
    allfiles=`find $here -name \*.$ext -print`
    for thefile in $allfiles ; do
        echo "Update : $thefile"
        grep -v "@SCALFMM_PRIVATE" $thefile > $thefile.$$.tmp
        mv $thefile.$$.tmp $thefile
    done
done