Skip to content
Snippets Groups Projects
Commit f3739804 authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Patch: small fix

Plumed.cmake is now treated as Plumed.inc
parent 6c42035e
No related branches found
No related tags found
No related merge requests found
...@@ -228,7 +228,7 @@ case "$action" in ...@@ -228,7 +228,7 @@ case "$action" in
exit 1 exit 1
fi fi
fi fi
if [ -L Plumed.h -o -L Plumed.inc ] if [ -L Plumed.h -o -L Plumed.inc -o -L Plumed.cmake ]
then then
echo "ERROR: you have likely already patched. Revert first (-r)" echo "ERROR: you have likely already patched. Revert first (-r)"
exit 1 exit 1
...@@ -249,10 +249,10 @@ case "$action" in ...@@ -249,10 +249,10 @@ case "$action" in
test -n "$quiet" || echo "Executing plumed_before_patch function" test -n "$quiet" || echo "Executing plumed_before_patch function"
plumed_before_patch plumed_before_patch
fi fi
test -n "$quiet" || echo "Linking Plumed.h and Plumed.inc ($mode mode)" test -n "$quiet" || echo "Linking Plumed.h, Plumed.inc, and Plumed.cmake ($mode mode)"
ln -s "$PLUMED_INCLUDEDIR/$PLUMED_PROGRAM_NAME/wrapper/Plumed.h" Plumed.h ln -fs "$PLUMED_INCLUDEDIR/$PLUMED_PROGRAM_NAME/wrapper/Plumed.h" Plumed.h
ln -s "$PLUMED_ROOT/src/lib/Plumed.inc.$mode" Plumed.inc ln -fs "$PLUMED_ROOT/src/lib/Plumed.inc.$mode" Plumed.inc
ln -s "$PLUMED_ROOT/src/lib/Plumed.cmake.$mode" Plumed.cmake ln -fs "$PLUMED_ROOT/src/lib/Plumed.cmake.$mode" Plumed.cmake
if [ -d "$diff" ]; then if [ -d "$diff" ]; then
test -n "$quiet" || echo "Patching with on-the-fly diff from stored originals" test -n "$quiet" || echo "Patching with on-the-fly diff from stored originals"
...@@ -309,9 +309,9 @@ case "$action" in ...@@ -309,9 +309,9 @@ case "$action" in
fi fi
;; ;;
(save) (save)
if [ ! -L Plumed.h -o ! -L Plumed.inc ] if [ ! -L Plumed.h -o ! -L Plumed.inc -o ! -L Plumed.cmake ]
then then
echo "ERROR: I cannot find Plumed.h and Plumed.inc files. You have likely not patched yet." echo "ERROR: I cannot find Plumed.h, Plumed.inc, and Plumed.cmake files. You have likely not patched yet."
exit 1 exit 1
fi fi
PREPLUMED=$(find . -name "*.preplumed" | sort) PREPLUMED=$(find . -name "*.preplumed" | sort)
...@@ -389,11 +389,11 @@ EOF ...@@ -389,11 +389,11 @@ EOF
test -n "$quiet" || echo "Executing plumed_before_revert function" test -n "$quiet" || echo "Executing plumed_before_revert function"
plumed_before_revert plumed_before_revert
fi fi
if [ ! -L Plumed.h -o ! -L Plumed.inc ] if [ ! -L Plumed.h -o ! -L Plumed.inc -o ! -L Plumed.cmake ]
then then
echo "WARNING: I cannot find Plumed.h and Plumed.inc files. You have likely not patched yet." echo "WARNING: I cannot find Plumed.h, Plumed.inc, and Plumed.cmake files. You have likely not patched yet."
else else
test -n "$quiet" || echo "Removing Plumed.h and Plumed.inc" test -n "$quiet" || echo "Removing Plumed.h, Plumed.inc, and Plumed.cmake"
rm Plumed.h Plumed.inc Plumed.cmake rm Plumed.h Plumed.inc Plumed.cmake
fi fi
PREPLUMED=$(find . -name "*.preplumed") PREPLUMED=$(find . -name "*.preplumed")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment