-sharp!/bin/bash
dir=/root/
code_dir="code"
doubleit()
{
local transfer_dir=$1
local moudles=`cat ${code_dir}/depend/$2`
for module in $ moudles;do
${code_dir}/build/build_module.sh $transfer_dir $module
transfer $transfer_dir
done
}
export -f doubleit
export -f transfer
export code_dir
parallel doubleit ::: $dir ::: base basis
the actual project uses roughly the above code, there are many basic modules, divided into two categories, one is c/cPP use, the other is nginx and php, so there is no dependency between the two modules I want to implement parallel compilation and packaging. However, each type of module should be compiled in the order in the file.
but after following the above writing, prompt job failed, I manually run the failed job and find that there is no problem, echo $? How to judge job failed?
error messages: (all are alarms, the information in the actual project may not be of much reference significance, which aspects can be checked)
Makefile:18: warning: overriding recipe for target `install"
common.mk:100: warning: ignoring old recipe for target `install"
upgrade_col.cpp: In function "void increase_update_count(unsigned int)" :
upgrade_col.cpp:170:33: warning: narrowing conversion of "uptime" from "time_t {aka long int}" to "unsigned int" inside { } is ill-formed in CPP11 [-Wnarrowing]
update_ctx_t uctx = {1, uptime};
^
Makefile:18: warning: overriding recipe for target `install"
common.mk:100: warning: ignoring old recipe for target `install"
parallel: This job failed:
build_packages_parallel /root/v2.5/code/build/eps_cloud basis