diff options
Diffstat (limited to 'xnew')
-rwxr-xr-x | xnew | 9 |
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 |