aboutsummaryrefslogblamecommitdiffstats
path: root/bin/ssg
blob: d3f2e02d1a5745232a5c50ccc149b0130618d347 (plain) (tree)
1
2
3
4
5
6
7
8
9

         
                        
 
       
 

                                          
 




                                      
 



                                           
 



                                     
#!/bin/sh

. $(dirname "${0}")/func

set -xe

# Check if the working directory is valid.
echo "${0}" | grep '^./bin/ssg$'

src_files="$(__list_files ${src_dir})"
dirs="${media_dir} \
	${src_dir} \
	${tmp_dir} \
	${out_dir}"

# Ensure directories exist.
for dir in ${dirs}; do
	[ ! -d "${dir}" ] && mkdir "${dir}"
done

# Generate output files from sources.
for src_file in ${src_files}; do
	__handle "${src_file}"
done
remember that computers suck.