Welcome to little lamb

Code » comain » master » tree

[master] / mkbuild

#!/bin/sh

if test ! -e build; then mkdir build; fi

for dir in src/*; do
    if test "$dir" = "src/*" || test "$dir" = "src/include"; then continue; fi
    find "$dir" -name "include" -prune -o -type d | while read -r d; do
        d="build/$(expr substr "$d" 5 ${#d})"
        if test ! -d "$d"; then mkdir "$d"; fi
    done
done