Last change
on this file was
3456,
checked in by jbclement, 2 months ago
|
PEM:
Cleaning of the adsorption module to make the debugging easier.
JBC
|
-
Property svn:executable set to
*
|
File size:
836 bytes
|
Rev | Line | |
---|
[3354] | 1 | #!/bin/bash |
---|
[3456] | 2 | ############################################################ |
---|
| 3 | ### Script to execute multiple scripts in subdirectories ### |
---|
| 4 | ############################################################ |
---|
[3354] | 5 | |
---|
| 6 | # Name of the file to execute in all subdirectories |
---|
| 7 | script_name="launchPEM.sh" |
---|
| 8 | #script_name="kill_launchPEM.sh" |
---|
| 9 | #script_name="clean.sh" |
---|
| 10 | #script_name="modify_startfi_orbit.sh" |
---|
| 11 | |
---|
| 12 | # Name of the template directory to skip |
---|
| 13 | tempdir_name="Template" |
---|
| 14 | |
---|
| 15 | # Traverse all subdirectories, excluding the template |
---|
| 16 | i=0 |
---|
| 17 | for dir in */; do |
---|
| 18 | if [ "$dir" == "$tempdir_name/" ]; then |
---|
| 19 | continue |
---|
| 20 | fi |
---|
| 21 | if [ -f "$dir/$script_name" ]; then |
---|
| 22 | echo "Executing $script_name in $dir..." |
---|
| 23 | pushd "$dir" > /dev/null |
---|
| 24 | ./$script_name |
---|
| 25 | popd > /dev/null |
---|
| 26 | ((i++)) |
---|
| 27 | fi |
---|
| 28 | done |
---|
| 29 | echo "Everything is executed: $i executions in total!" |
---|
| 30 | |
---|
Note: See
TracBrowser
for help on using the repository browser.