diff --git a/src/COMPRESS/Install.sh b/src/COMPRESS/Install.sh
index ef1c8920c8686f3a4737cd6114b445c7aedc83ec..ab9dac33dc92f2b9bfa70f13c32438dfa20d6108 100644
--- a/src/COMPRESS/Install.sh
+++ b/src/COMPRESS/Install.sh
@@ -29,7 +29,7 @@ action () {
 # all package files with no dependencies
 
 for file in *.cpp *.h; do
-  action $file
+  test -f ${file} && action $file
 done
 
 # edit 2 Makefile.package files to include/exclude package info
diff --git a/src/KIM/Install.sh b/src/KIM/Install.sh
index bac9d97cc62cc620d618c77a880cf608b6ffdd06..7ddb9c8227ce027476157f9829fd644a2a6e9071 100644
--- a/src/KIM/Install.sh
+++ b/src/KIM/Install.sh
@@ -29,7 +29,7 @@ action () {
 # all package files with no dependencies
 
 for file in *.cpp *.h; do
-  action $file
+  test -f ${file} && action $file
 done
 
 # edit 2 Makefile.package files to include/exclude package info
diff --git a/src/MEAM/Install.sh b/src/MEAM/Install.sh
index 1825d4327f461af90310f5a7aa646793b302e291..7bfc76c0e2ed72390f980347ea1130e8d5850c82 100644
--- a/src/MEAM/Install.sh
+++ b/src/MEAM/Install.sh
@@ -29,7 +29,7 @@ action () {
 # all package files with no dependencies
 
 for file in *.cpp *.h; do
-  action $file
+  test -f ${file} && action $file
 done
 
 # edit 2 Makefile.package files to include/exclude package info
diff --git a/src/MPIIO/Install.sh b/src/MPIIO/Install.sh
index 3834aea5c5c7498f31dbd8edb5dce3aed9e734ee..902bff2fc8cc2ff23b8742d75f69f6ab2d3712de 100644
--- a/src/MPIIO/Install.sh
+++ b/src/MPIIO/Install.sh
@@ -36,7 +36,7 @@ touch ../write_restart.cpp
 # all package files with no dependencies
 
 for file in *.cpp *.h; do
-  action $file
+  test -f ${file} && action $file
 done
 
 # edit 2 Makefile.package to include/exclude LMP_MPIIO setting
diff --git a/src/MSCG/Install.sh b/src/MSCG/Install.sh
index f7c7452101897ef3d9778072a927fc9d6f8ca69f..353403c7da5b2c09d0023fd49ba6826a2abf6fc9 100755
--- a/src/MSCG/Install.sh
+++ b/src/MSCG/Install.sh
@@ -25,7 +25,7 @@ action () {
 # all package files with no dependencies
 
 for file in *.cpp *.h; do
-  action $file
+  test -f ${file} && action $file
 done
 
 # edit 2 Makefile.package files to include/exclude package info
diff --git a/src/POEMS/Install.sh b/src/POEMS/Install.sh
index 7996f542be37dc8e8a4d5f358329067d9e8e0afe..be407d76f0a65fa58e15fdd7abdb2da48439bdb9 100644
--- a/src/POEMS/Install.sh
+++ b/src/POEMS/Install.sh
@@ -29,7 +29,7 @@ action () {
 # all package files with no dependencies
 
 for file in *.cpp *.h; do
-  action $file
+  test -f ${file} && action $file
 done
 
 # edit 2 Makefile.package files to include/exclude package info
diff --git a/src/PYTHON/Install.sh b/src/PYTHON/Install.sh
index 3d6f71958a7f9caf30ad8365a71eb67622e453f7..71288cf3774127d44970449d7fcf06921caf0e2b 100755
--- a/src/PYTHON/Install.sh
+++ b/src/PYTHON/Install.sh
@@ -35,7 +35,7 @@ touch ../variable.cpp
 # all package files with no dependencies
 
 for file in *.cpp *.h; do
-  action $file
+  test -f ${file} && action $file
 done
 
 # edit 2 Makefile.package files to include/exclude package info
diff --git a/src/REAX/Install.sh b/src/REAX/Install.sh
index f0083810e9b403acc48710010531d217c90621c9..bf8c8dbca2cbdfe488ef3cce5320cf8c4b1dee34 100644
--- a/src/REAX/Install.sh
+++ b/src/REAX/Install.sh
@@ -29,7 +29,7 @@ action () {
 # all package files with no dependencies
 
 for file in *.cpp *.h; do
-  action $file
+  test -f ${file} && action $file
 done
 
 # edit 2 Makefile.package files to include/exclude package info
diff --git a/src/USER-ATC/Install.sh b/src/USER-ATC/Install.sh
index 113738901843421f6d5d3e9a6f4fef6372203f3a..f719fe220f7c60438c55e28ddd22458d20897b1a 100755
--- a/src/USER-ATC/Install.sh
+++ b/src/USER-ATC/Install.sh
@@ -29,7 +29,7 @@ action () {
 # all package files with no dependencies
 
 for file in *.cpp *.h; do
-  action $file
+  test -f ${file} && action $file
 done
 
 # edit 2 Makefile.package files to include/exclude package info
diff --git a/src/USER-AWPMD/Install.sh b/src/USER-AWPMD/Install.sh
index 7922c53395e986a62699b24a61a4f6b48faa59e3..094e10c157549e27405f539bb0824ea96516399a 100644
--- a/src/USER-AWPMD/Install.sh
+++ b/src/USER-AWPMD/Install.sh
@@ -29,7 +29,7 @@ action () {
 # all package files with no dependencies
 
 for file in *.cpp *.h; do
-  action $file
+  test -f ${file} && action $file
 done
 
 # edit 2 Makefile.package files to include/exclude package info
diff --git a/src/USER-COLVARS/Install.sh b/src/USER-COLVARS/Install.sh
index c01719e76630a4a170c4a3f7b715cfbf3bb1dc08..d67883a41614fd9028453aac9a18f0ad79948d79 100755
--- a/src/USER-COLVARS/Install.sh
+++ b/src/USER-COLVARS/Install.sh
@@ -29,7 +29,7 @@ action () {
 # all package files with no dependencies
 
 for file in *.cpp *.h; do
-  action $file
+  test -f ${file} && action $file
 done
 
 # edit 2 Makefile.package files to include/exclude package info
diff --git a/src/USER-H5MD/Install.sh b/src/USER-H5MD/Install.sh
index bdda732807b033c6631a26ae74c124e9d98734d1..1070afaa9618eaed1debcab9bb528a648224fdf8 100644
--- a/src/USER-H5MD/Install.sh
+++ b/src/USER-H5MD/Install.sh
@@ -27,7 +27,7 @@ action () {
 }
 
 for file in *.cpp *.h; do
-  action $file
+  test -f ${file} && action $file
 done
 
 # edit 2 Makefile.package files to include/exclude package info
diff --git a/src/USER-MISC/Install.sh b/src/USER-MISC/Install.sh
index 203d9231641ee7fe7013e2b06c456c691808fa7b..2d42125ec3a79cdb00cc88cb31d12b8be3959f4d 100644
--- a/src/USER-MISC/Install.sh
+++ b/src/USER-MISC/Install.sh
@@ -35,6 +35,6 @@ for file in *.cpp *.h; do
   elif (test $file = "pair_cdeam.h") then
     action pair_cdeam.h pair_eam_alloy.cpp
   else
-    action $file
+    test -f ${file} && action $file
   fi
 done
diff --git a/src/USER-MOLFILE/Install.sh b/src/USER-MOLFILE/Install.sh
index 19fd3bd361fab307063d032ec346e0ea8224572d..85885f66b921a118b5a05b5a365556a2db9f5f77 100644
--- a/src/USER-MOLFILE/Install.sh
+++ b/src/USER-MOLFILE/Install.sh
@@ -29,7 +29,7 @@ action () {
 # all package files with no dependencies
 
 for file in *.cpp *.h; do
-  action $file
+  test -f ${file} && action $file
 done
 
 # edit 2 Makefile.package files to include/exclude package info
diff --git a/src/USER-NC-DUMP/Install.sh b/src/USER-NC-DUMP/Install.sh
index 37ebd0a0a5b5abda1dfe33545f899e5c46a5afaf..4d21f0f894b9cba4abd69549852f7c72ee3a7549 100644
--- a/src/USER-NC-DUMP/Install.sh
+++ b/src/USER-NC-DUMP/Install.sh
@@ -27,7 +27,7 @@ action () {
 }
 
 for file in *.cpp *.h; do
-  action $file
+  test -f ${file} && action $file
 done
 
 # edit 2 Makefile.package files to include/exclude package info
diff --git a/src/USER-QMMM/Install.sh b/src/USER-QMMM/Install.sh
index 089b880a777f8c236f203866eccd5c1f820edb23..4bede66d80676acc18fbc9fd7f004eab2e79cb1c 100755
--- a/src/USER-QMMM/Install.sh
+++ b/src/USER-QMMM/Install.sh
@@ -29,7 +29,7 @@ action () {
 # all package files with no dependencies
 
 for file in *.cpp *.h; do
-  action $file
+  test -f ${file} && action $file
 done
 
 # edit 2 Makefile.package files to include/exclude package info
diff --git a/src/USER-QUIP/Install.sh b/src/USER-QUIP/Install.sh
index ee7faaf62aad7697b3f1f2e64eeb28d1522ea312..20174e664a4478a067f6a0014146b6966e641d76 100644
--- a/src/USER-QUIP/Install.sh
+++ b/src/USER-QUIP/Install.sh
@@ -29,7 +29,7 @@ action () {
 # all package files with no dependencies
 
 for file in *.cpp *.h; do
-  action $file
+  test -f ${file} && action $file
 done
 
 # edit 2 Makefile.package files to include/exclude package info
diff --git a/src/USER-SMD/Install.sh b/src/USER-SMD/Install.sh
index c0f48c54603b2ce0140e83d04cb65ac5f20443f2..cb9aa5452bc08d71135c82bb21381fcf840acca9 100644
--- a/src/USER-SMD/Install.sh
+++ b/src/USER-SMD/Install.sh
@@ -29,7 +29,7 @@ action () {
 # all package files with no dependencies
 
 for file in *.cpp *.h; do
-  action $file
+  test -f ${file} && action $file
 done
 
 # edit 2 Makefile.package files to include/exclude package info
diff --git a/src/USER-VTK/Install.sh b/src/USER-VTK/Install.sh
index d02dc8777269b9bd37d9ef03b99acb836584b121..3749242fb2183eaa2d7bf75738f32e838c431d4a 100644
--- a/src/USER-VTK/Install.sh
+++ b/src/USER-VTK/Install.sh
@@ -27,7 +27,7 @@ action () {
 }
 
 for file in *.cpp *.h; do
-  action $file
+  test -f ${file} && action $file
 done
 
 # edit 2 Makefile.package files to include/exclude package info
diff --git a/src/VORONOI/Install.sh b/src/VORONOI/Install.sh
index f21e9404ebee3408d20b1880c29dd7129d334491..6373506b19cf21dfbf16830dfe38bf344f7171aa 100755
--- a/src/VORONOI/Install.sh
+++ b/src/VORONOI/Install.sh
@@ -29,7 +29,7 @@ action () {
 # all package files with no dependencies
 
 for file in *.cpp *.h; do
-  action $file
+  test -f ${file} && action $file
 done
 
 # edit 2 Makefile.package files to include/exclude package info