#!/bin/ksh

bin=bin

while getopts b: option
do
 case $option in
  b) bin=$OPTARG;;
 \?) exit 1;;
 esac
done

set -xuve

bin="../../../$bin"
mkdir -p $bin
ls -lrt $bin

for nemo_config in `ls -1 ../nemo*/CONFIG | grep ORCA`; do
 mkdir -p $bin/$nemo_config
 cp -pf ../nemo-3.3.1/CONFIG/$nemo_config/BLD/bin/*.exe $bin/$nemo_config
done

ls -lrt $bin
