File: solve_instances

package info (click to toggle)
papilo 2.4.4%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,216 kB
  • sloc: cpp: 41,731; fortran: 4,032; f90: 3,203; python: 1,390; sh: 1,221; ansic: 986; xml: 276; makefile: 156
file content (23 lines) | stat: -rwxr-xr-x 441 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash

if [ "$#" -ne 3 ]; then
   echo "Expected three arguments: solver script, instance folder and log file"
   exit
fi

if [ ! -e "$1" ]; then
   echo "Couldn't find solver script $1"
   exit
fi

if [ ! -d "$2" ]; then
   echo "Couldn't find instance folder $2"
   exit
fi

solver=$1
log_file=$3
for file in $2/*; do
   source $solver $file $log_file
   read -rsp $'Press any key or wait 3 seconds to continue...\n' -n 1 -t 3;
done