aboutsummaryrefslogtreecommitdiff
path: root/snag/scripts/run_pkg_build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'snag/scripts/run_pkg_build.sh')
-rwxr-xr-xsnag/scripts/run_pkg_build.sh15
1 files changed, 14 insertions, 1 deletions
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 <description script>" >&2
+ exit 1
+fi
if [ -z "$1" ]; then
echo "Usage: $0 <description script>" >&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"