shell script taking two arguments and setting CPFEM_xxx and

constitutive_yyy symbolic links from those
This commit is contained in:
Philip Eisenlohr 2009-01-19 13:37:37 +00:00
parent 4b67529aaf
commit e3e42fdf44
1 changed files with 20 additions and 0 deletions

20
trunk/setup_links Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
if [[ $# < 2 ]]; then # check the number of command line arguments
echo "usage: $0 homogenization_scheme constitutive_law"
exit
fi
if [[ !(-f "CPFEM_$1.f90") ]]; then
echo "no file CPFEM_$1.f90 present"
else
if [[ !(-f "constitutive_$2.f90") ]]; then
echo "no file constitutive_$2.f90 present"
exit
else
rm CPFEM.f90
ln -s CPFEM_$1.f90 CPFEM.f90
rm constitutive.f90
ln -s constitutive_$2.f90 constitutive.f90
fi
fi