Answer the question
In order to leave comments, you need to log in
Why can't you find functions in the included file?
Reports that line 75: getProjectPath: command not found , etc. where there is a function call.
The structure is:
~/build_script/build_dev - (chmod +x)
~/build_script/libs/
~/build_script/libs/dev.sh (chmod +x)
build_dev:
#!/bin/bash
. ./libs/dev.sh
getProjectPath $project
if [ "$test" = "true" ]
then
cleanTmp
fi
function cleanTmp {
echo "Удаляем результат сборки проекта"
rm -Rf $BUILD_DIR/*
rm -Rf $BUILD_DIR/.g*
if [ $(ls -a "$BUILD_DIR" | wc -l) -eq 2 ]
then
echo -e "\e[32mCборка проекта: ${project} успешно удалена\e[0m"
fi
}
function getProjectPath() {
local name=$(echo $1 | tr [a-z] [A-Z])
eval echo \${$name[path]}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question