summary refs log tree commit diff
path: root/xnew
diff options
context:
space:
mode:
authorPiotr Wójcik <chocimier@tlen.pl>2019-12-14 15:34:46 +0100
committerLeah Neukirchen <leah@vuxu.org>2019-12-15 21:38:14 +0100
commit30eeec30515a3bfe47872528c1ef09ac861d561b (patch)
tree29337801a304be3c7ed4c33bcdf5ed521b1feb2d /xnew
parent87a225c26e9046db5e552e6f78c1bd3d7eeb733b (diff)
downloadxtools-30eeec30515a3bfe47872528c1ef09ac861d561b.tar.gz
xtools-30eeec30515a3bfe47872528c1ef09ac861d561b.tar.xz
xtools-30eeec30515a3bfe47872528c1ef09ac861d561b.zip
xnew: append subpkgs
Closes: #164 [via git-merge-pr]
Diffstat (limited to 'xnew')
-rwxr-xr-xxnew9
1 files changed, 9 insertions, 0 deletions
diff --git a/xnew b/xnew
index 49fa5a5..8473d48 100755
--- a/xnew
+++ b/xnew
@@ -1,6 +1,11 @@
 #!/bin/sh -e
 # xnew PKG - create XBPS template template
 
+if [ "$1" = "-a" ]; then
+	append=1
+	shift
+fi
+
 PKG=${1?no package name given}
 srcdir=$(xdistdir)/srcpkgs
 shift
@@ -29,6 +34,8 @@ case "$PKG" in
 	distfiles="$homepage\${pkgname}-\${version}.$ext"
 esac
 
+if [ -z "$append" ]; then
+
 mkdir $srcdir/$PKG
 
 cat >$srcdir/$PKG/template <<EOF
@@ -56,6 +63,8 @@ distfiles="$distfiles"
 checksum=badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb
 EOF
 
+fi
+
 for subpkg; do
 	ln -sr -- "$srcdir/$PKG" "$srcdir/$subpkg"
 	cat >>$srcdir/$PKG/template <<EOF