26 lines
1013 B
Bash
Executable File
26 lines
1013 B
Bash
Executable File
#!/usr/bin/env bash
|
|
##
|
|
## u6a_run - helper script for running tests for u6a
|
|
##
|
|
## Copyright (C) 2020 CismonX <admin@cismon.net>
|
|
##
|
|
## This program is free software: you can redistribute it and/or modify
|
|
## it under the terms of the GNU General Public License as published by
|
|
## the Free Software Foundation, either version 3 of the License, or
|
|
## (at your option) any later version.
|
|
##
|
|
## This program is distributed in the hope that it will be useful,
|
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
## GNU General Public License for more details.
|
|
##
|
|
## You should have received a copy of the GNU General Public License
|
|
## along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
##
|
|
|
|
U6A_BYTECODE=`echo $4 | $1 - | $3`
|
|
test -z $U6A_BYTECODE && exit -1
|
|
cat <(echo $U6A_BYTECODE | base64 -d) <(test $5 && cat $5) | $2 -
|
|
|
|
# Usage: ./u6a_run /path/to/u6ac/bin /path/to/u6a/bin /path/to/base64/bin source_code [input]
|