[build] Added ability to specify dependent functions
This commit is contained in:
parent
b179b90d83
commit
b45c5a8e6b
2 changed files with 7 additions and 6 deletions
9
build.sh
9
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}
|
||||
|
|
|
@ -16,8 +16,4 @@ import_dir() {
|
|||
|
||||
local trackList=($(find ${TRACK_DIR} -maxdepth=1 -name *.flac -print '%p\t'))
|
||||
|
||||
for track in ${trackList[@]}; do
|
||||
|
||||
done
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue