diff --git a/tutorials/solidMechanics/icoFsiElasticNonLinULSolidFoam/HronTurekFsi/makeLinks b/tutorials/solidMechanics/icoFsiElasticNonLinULSolidFoam/HronTurekFsi/makeLinks index 985cce1ea..07f387d7e 100755 --- a/tutorials/solidMechanics/icoFsiElasticNonLinULSolidFoam/HronTurekFsi/makeLinks +++ b/tutorials/solidMechanics/icoFsiElasticNonLinULSolidFoam/HronTurekFsi/makeLinks @@ -1,39 +1,29 @@ -#!/bin/tcsh +#!/bin/bash # Check for proper number of command line args. -if ($#argv != 2) then +if [ "$#" -ne 2 ]; then echo "Usage: makeLinks fluidCase solidCase" - goto done -endif - + exit 1 +fi echo changing into fluid directory -cd $1 +cd $1/constant -cd constant echo creating links - ln -s ../../$2/constant solid - cd ../system - ln -s ../../$2/system solid - cd ../0 - ln -s ../../$2/0 solid - cd .. echo creating processor links -foreach proc(processor*) -cd $proc -cd 0 -ln -s ../../../$2/$proc/0 solid -cd ../constant -ln -s ../../../$2/$proc/constant solid -cd ../.. -end - -done: - exit 0 +for proc in processor* +do + cd $proc + cd 0 + ln -s ../../../$2/$proc/0 solid + cd ../constant + ln -s ../../../$2/$proc/constant solid + cd ../.. +done diff --git a/tutorials/solidMechanics/icoFsiElasticNonLinULSolidFoam/HronTurekFsi/makeSerialLinks b/tutorials/solidMechanics/icoFsiElasticNonLinULSolidFoam/HronTurekFsi/makeSerialLinks index fd8b852e6..b4df1a3ef 100755 --- a/tutorials/solidMechanics/icoFsiElasticNonLinULSolidFoam/HronTurekFsi/makeSerialLinks +++ b/tutorials/solidMechanics/icoFsiElasticNonLinULSolidFoam/HronTurekFsi/makeSerialLinks @@ -1,4 +1,10 @@ -#!/bin/sh +#!/bin/bash + +# Check for proper number of command line args. +if [ "$#" -ne 2 ]; then + echo "Usage: makeSerialLinks fluidCase solidCase" + exit 1 +fi cd $1 cd constant @@ -7,7 +13,4 @@ cd ../system ln -s ../../$2/system solid cd ../0 ln -s ../../$2/0 solid -cd ../../ - - - +cd ../.. diff --git a/tutorials/solidMechanics/icoFsiElasticNonLinULSolidFoam/HronTurekFsi/removeSerialLinks b/tutorials/solidMechanics/icoFsiElasticNonLinULSolidFoam/HronTurekFsi/removeSerialLinks index 996eaab41..fca8c2dd2 100755 --- a/tutorials/solidMechanics/icoFsiElasticNonLinULSolidFoam/HronTurekFsi/removeSerialLinks +++ b/tutorials/solidMechanics/icoFsiElasticNonLinULSolidFoam/HronTurekFsi/removeSerialLinks @@ -1,4 +1,10 @@ -#!/bin/sh +#!/bin/bash + +# Check for proper number of command line args. +if [ "$#" -ne 2 ]; then + echo "Usage: removeSerialLinks fluidCase solidCase" + exit 1 +fi cd $1 rm -rf 0/solid