about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2014-09-15 00:31:30 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2014-09-15 00:31:30 +0200
commit685083146fdd618ca4314657665f014a82ba981b (patch)
tree2ec77cfca13d3270a61633fa5724dcfe1d4ff08c
parent029899237784d315db92db4ed874343e22080969 (diff)
downloadxtools-685083146fdd618ca4314657665f014a82ba981b.tar.gz
xtools-685083146fdd618ca4314657665f014a82ba981b.tar.xz
xtools-685083146fdd618ca4314657665f014a82ba981b.zip
add xbulk
-rwxr-xr-xxbulk20
1 files changed, 20 insertions, 0 deletions
diff --git a/xbulk b/xbulk
new file mode 100755
index 0000000..8949b4d
--- /dev/null
+++ b/xbulk
@@ -0,0 +1,20 @@
+#!/bin/sh
+# xbulk [-n] [-k] [-xbps_src_flags] PKG... - simple XBPS bulk builder
+
+ARGS=
+MAKEARGS=
+
+{
+for pkg; do
+case $pkg in
+	-n|-k) MAKEARGS="$MAKEARGS $pkg";;
+	-*) ARGS="$ARGS $pkg";;
+	*)
+	echo all: pkg-$pkg
+	for dep in $(./xbps-src show-build-deps $pkg | sed '1d;s|[<>].*$||g'); do
+		echo pkg-$pkg: pkg-$dep
+	done
+esac
+done 
+printf '%s\n' pkg-%: "	pkg=\$@; ./xbps-src $ARGS pkg \$\${pkg#pkg-}"
+} | make -f - $MAKEARGS