LINUX.ORG.RU

bat


0

1

как запустить в linux на выполнение bat файл:

#!/bin/bash

# «name» and «dirout» are named according to the testcase

name=CaseDambreak2D

dirout=${name}_out

# «executables» are renamed and called from their directory

preproc="../../EXECS/PreProc"

gpusph="../../EXECS/gpuSPH"

postproc="../../EXECS/PostProc"

# Library path must be indicated properly

current=$(pwd)

cd ../../EXECS

path_so=$(pwd)

cd $current

export LD_LIBRARY_PATH=$path_so

# «dirout» is created to store results or it is cleaned if it already exists

if [ -e $dirout ]; then

rm -f -r $dirout

fi

mkdir $dirout

# CODES are executed according the selected parameters of execution in this tescase

errcode=0

if [ $errcode -eq 0 ]; then

$preproc ${name}_Def $dirout/$name -save:all

errcode=$?

fi

if [ $errcode -eq 0 ]; then

$gpusph $dirout/$name $dirout -svres -cpu

errcode=$?

fi

if [ $errcode -eq 0 ]; then

$postproc -dirin $dirout -savevtk $dirout/PartFluid -onlytype:-all,fluid -vars:+id,+vel,+rhop,+press,+vor

errcode=$? fi

if [ $errcode -eq 0 ]; then

echo All done

else

echo Execution aborted

fi

read -n1 -r -p «Press any key to continue...» key

echo



Последнее исправление: sergey_snz (всего исправлений: 3)

Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.