소스 검색

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