2020-03-14 20:31:20 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
##
|
2020-06-08 16:30:27 +00:00
|
|
|
# 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/>.
|
|
|
|
#
|
2020-03-14 20:31:20 +00:00
|
|
|
|
2020-03-15 08:21:18 +00:00
|
|
|
U6A_BYTECODE=`echo $5 | $1 - | base64 $3`
|
2020-03-14 21:08:01 +00:00
|
|
|
test -z $U6A_BYTECODE && exit -1
|
2020-03-15 08:21:18 +00:00
|
|
|
cat <(echo $U6A_BYTECODE | base64 $4) <(test $6 && cat $6) | $2 -
|
2020-03-14 20:31:20 +00:00
|
|
|
|
2020-03-15 08:21:18 +00:00
|
|
|
# Usage: ./u6a_run u6ac_bin u6a_bin b64_encode_ops b64_decode_ops src_code [input_file]
|