Skip to content

Commit

Permalink
adding an exstension to sed -i
Browse files Browse the repository at this point in the history
  • Loading branch information
Iximiel committed Jun 21, 2023
1 parent 4deca2b commit 29089c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/mklib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ cp "${file}" "${tmpfile}"

if grep -q '^#include "\(bias\|colvar\|function\|sasa\|vatom\)\/ActionRegister.h"' "${tmpfile}"; then
>&2 echo 'WARNING: using a legacy ActionRegister.h include path, please use <<#include "core/ActionRegister.h">>'
sed 's%^#include ".*/ActionRegister.h"%#include "core/ActionRegister.h"%g' -i "${tmpfile}"
sed 's%^#include ".*/ActionRegister.h"%#include "core/ActionRegister.h"%g' -i.bak "${tmpfile}"
fi

if grep -q '^#include "\(cltools\)\/CLToolRegister.h"' "${tmpfile}"; then
>&2 echo 'WARNING: using a legacy CLToolRegister.h include path, please use <<#include "core/CLToolRegister.h">>'
sed 's%^#include ".*/CLToolRegister.h"%#include "core/CLToolRegister.h"%g' -i "${tmpfile}"
sed 's%^#include ".*/CLToolRegister.h"%#include "core/CLToolRegister.h"%g' -i.bak "${tmpfile}"
fi

rm -f "$obj" "$lib"
Expand All @@ -53,4 +53,4 @@ else
eval "$compile" "$obj" "$tmpfile" && eval "$link_uninstalled" "$lib" "$obj"
fi

rm -f ${tmpfile}
rm -f ${tmpfile} ${tmpfile}.bak

0 comments on commit 29089c7

Please sign in to comment.