Преглед изворни кода

Allow custom interpreter in runall script

Taddeus Kroes пре 7 година
родитељ
комит
86304d4d1d
1 измењених фајлова са 3 додато и 2 уклоњено
  1. 3 2
      runall.sh

+ 3 - 2
runall.sh

@@ -1,9 +1,10 @@
-#!/bin/bash
+#!/usr/bin/env bash
+interp=${1-python3}
 i=1
 for f in *.py
 do
     echo "-- problem $i -----------------------------------"
-    cmd="`which time` -f 'elapsed: %E' ./$f"
+    cmd="`which time` -f 'elapsed: %E' $interp $f"
     if [ -e input/$i ]
     then cmd+=" < input/$i"
     fi