lean2/src/cmake/redirect.sh
Leonardo de Moura 0eaa98221b fix(shell/lean): Lua repl missing, incorrect exit code in interactive mode, missing tests
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-09 12:25:19 -08:00

11 lines
285 B
Bash
Executable file

#!/bin/bash
# Auxiliary script for redirecting input
# Given the arguments $1 ... $n-1 $n,
# it executes the command
# $1 ... $n-1 < $n
# This is a hack to workaround a ctest limitation
length=$(($#-1))
array=${@:1:$length}
shift `expr $# - 1`
last=`echo $1`
$array < $last