Skip to content
Permalink
Browse files

Shell script

  • Loading branch information...
ichyo committed Jun 21, 2019
1 parent ba6f34a commit c8385aed6b50e2345b0ccf0d8a9e7b390f479090
Showing with 12 additions and 5 deletions.
  1. +2 −5 make_solution.sh
  2. +10 −0 solve_single.sh
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

set -eu

@@ -13,10 +13,7 @@ export OUTPUT

echo "running..."
for f in ./input/prob-*.desc; do
ID=$(echo $f | sed -E 's/\.\/input\/prob\-([0-9]+)\.desc/\1/')
INPUT_FILE=./input/prob-$ID.desc
OUTPUT_FILE=$OUTPUT/prob-$ID.sol
./target/release/icfpc2019 < $INPUT_FILE > $OUTPUT_FILE
./solve_single.sh $f $OUTPUT
done

echo "Creating zip $OUTPUT/solutions.zip"
@@ -0,0 +1,10 @@
#!/bin/sh

set -eu

FILE=$1
OUTPUT=$2
ID=$(echo $FILE | sed -E 's/\.\/input\/prob\-([0-9]+)\.desc/\1/')
INPUT_FILE=./input/prob-$ID.desc
OUTPUT_FILE=$OUTPUT/prob-$ID.sol
./target/release/icfpc2019 < $INPUT_FILE > $OUTPUT_FILE

0 comments on commit c8385ae

Please sign in to comment.
You can’t perform that action at this time.