18 lines
350 B
Bash
Executable file
18 lines
350 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
## consts
|
|
|
|
dir_from=source/outputs
|
|
dir_to=build/templates
|
|
|
|
|
|
## exec
|
|
|
|
paths=$(find ${dir_from} -type d -name templates)
|
|
for path in ${paths}
|
|
do
|
|
type=$(echo ${path} | cut --delimiter='/' --fields='3-' | cut --delimiter='/' --fields='-2')
|
|
mkdir --parents ${dir_to}/${type}
|
|
cp --update --verbose ${path}/* ${dir_to}/${type}/
|
|
done
|