We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ba6f34a commit c8385aeCopy full SHA for c8385ae
2 files changed
make_solution.sh
@@ -1,4 +1,4 @@
1
-#!/bin/sh
+#!/bin/bash
2
3
set -eu
4
@@ -13,10 +13,7 @@ export OUTPUT
13
14
echo "running..."
15
for f in ./input/prob-*.desc; do
16
- ID=$(echo $f | sed -E 's/\.\/input\/prob\-([0-9]+)\.desc/\1/')
17
- INPUT_FILE=./input/prob-$ID.desc
18
- OUTPUT_FILE=$OUTPUT/prob-$ID.sol
19
- ./target/release/icfpc2019 < $INPUT_FILE > $OUTPUT_FILE
+ ./solve_single.sh $f $OUTPUT
20
done
21
22
echo "Creating zip $OUTPUT/solutions.zip"
solve_single.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -eu
5
+FILE=$1
6
+OUTPUT=$2
7
+ID=$(echo $FILE | sed -E 's/\.\/input\/prob\-([0-9]+)\.desc/\1/')
8
+INPUT_FILE=./input/prob-$ID.desc
9
+OUTPUT_FILE=$OUTPUT/prob-$ID.sol
10
+./target/release/icfpc2019 < $INPUT_FILE > $OUTPUT_FILE
0 commit comments