Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(run-fpm.sh): revert to copying header into build dir #115

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 1 addition & 20 deletions cloud-microphysics/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,27 +102,8 @@ if [ $CI = true ]; then
fi

export PKG_CONFIG_PATH
touch build/run-fpm.sh
cp src/run-fpm.sh-header build/run-fpm.sh
RUN_FPM_SH="`realpath ./build/run-fpm.sh`"
echo "#!/bin/sh" >> $RUN_FPM_SH
echo "#-- DO NOT EDIT -- created by inference-engine/setup.sh" >> $RUN_FPM_SH
echo "export PKG_CONFIG_PATH" >> $RUN_FPM_SH
echo "" >> $RUN_FPM_SH
echo "fpm_arguments=\"\"" >> $RUN_FPM_SH
echo "program_arguments=\"\"" >> $RUN_FPM_SH
echo "while test \$# -gt 0" >> $RUN_FPM_SH
echo "do" >> $RUN_FPM_SH
echo " case \"\$1\" in" >> $RUN_FPM_SH
echo " --) program_arguments=\"\$@\"" >> $RUN_FPM_SH
echo " ;;" >> $RUN_FPM_SH
echo " *) if [ -z \"\$program_arguments\" ]; then" >> $RUN_FPM_SH
echo " fpm_arguments=\"\$fpm_arguments \$1\"" >> $RUN_FPM_SH
echo " fi" >> $RUN_FPM_SH
echo " ;;" >> $RUN_FPM_SH
echo " esac" >> $RUN_FPM_SH
echo " shift" >> $RUN_FPM_SH
echo "done" >> $RUN_FPM_SH
echo "" >> $RUN_FPM_SH
echo "`which fpm` \$fpm_arguments \\" >> $RUN_FPM_SH
echo "--profile release \\" >> $RUN_FPM_SH
echo "--c-compiler \"`pkg-config inference-engine --variable=INFERENCE_ENGINE_FPM_CC`\" \\" >> $RUN_FPM_SH
Expand Down
18 changes: 18 additions & 0 deletions cloud-microphysics/src/run-fpm.sh-header
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh
#-- DO NOT EDIT -- created by inference-engine/setup.sh
export PKG_CONFIG_PATH

fpm_arguments=""
program_arguments=""
while test $# -gt 0
do
case "$1" in
--) program_arguments="$@"
;;
*) if [ -z "$program_arguments" ]; then
fpm_arguments="$fpm_arguments $1"
fi
;;
esac
shift
done
Loading