Эх сурвалжийг харах

Allow custom interpreter in runall script

Taddeus Kroes 7 жил өмнө
parent
commit
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