diff --git a/build.sh b/build.sh index be61664..60b54bf 100755 --- a/build.sh +++ b/build.sh @@ -3,9 +3,13 @@ EXEC=dam test_function() { - functionList=(${@}) + local functionList=(${@}) source src/env for function in ${functionList[@]}; do + local dependencyList=($(grep "# DEPENDENCIES" ${function} | sed 's|# DEPENDENCIES||')) + for dependency in ${dependencyList[@]}; do + eval source ${dependency} + done bash ${function} done } @@ -30,7 +34,7 @@ gen_env() { } gen_function() { - functionList=(${@}) + local functionList=(${@}) for function in ${functionList[@]}; do awk '!/^ *#/ && NF' ${function} done @@ -41,6 +45,7 @@ gen_parser() { } test_function $(find src/ -type f -not -name env -not -name parser) +# test_function src/import_track gen_env > ${EXEC} gen_help >> ${EXEC} diff --git a/src/import_dir b/src/import_dir index 4122286..6f38e58 100644 --- a/src/import_dir +++ b/src/import_dir @@ -16,8 +16,4 @@ import_dir() { local trackList=($(find ${TRACK_DIR} -maxdepth=1 -name *.flac -print '%p\t')) - for track in ${trackList[@]}; do - - done - }