Skip to content

Commit

Permalink
fix(run-fpm.sh): revert to copying header
Browse files Browse the repository at this point in the history
  • Loading branch information
rouson committed Jan 24, 2024
1 parent 0ef31d6 commit 367c84d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 20 deletions.
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

0 comments on commit 367c84d

Please sign in to comment.