From cfcc59d16d7dd59a4c6470e6c94289f453d7dbb3 Mon Sep 17 00:00:00 2001 From: Riley Beckett Date: Fri, 24 Jul 2026 01:31:51 -0400 Subject: basic api starter code --- snag/scripts/run_pkg_build.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'snag/scripts') diff --git a/snag/scripts/run_pkg_build.sh b/snag/scripts/run_pkg_build.sh index d48d831..3e4b867 100755 --- a/snag/scripts/run_pkg_build.sh +++ b/snag/scripts/run_pkg_build.sh @@ -2,15 +2,28 @@ # reads a package description script and runs the configure, build, and install # steps. intended only for use by snag program +if [ -z "$1" -a -z "$2" -a -z "$3" ]; then + echo "Usage: $0 " >&2 + exit 1 +fi if [ -z "$1" ]; then echo "Usage: $0 " >&2 exit 1 fi +api_send=$1 +api_recv=$2 + +# should remove +eval "printf '\x02\x00\x00\x00' >&$api_send" +IFS= read -r data 0<&"$api_recv" +echo "data=$data" + # load the description script -. $1 +. $3 # run all install steps for package configure build install +eval "printf '\x01\x00\x00\x00' >&$api_send" -- cgit v1.2.3