From c820f72b1af215bdb4dd73377ac734722e8ad124 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Fri, 2 Jan 2015 12:14:17 +0100 Subject: add xdowngrade --- README | 1 + xdowngrade | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100755 xdowngrade diff --git a/README b/README index 68ebe2d..bca493e 100644 --- a/README +++ b/README @@ -8,6 +8,7 @@ https://github.com/voidlinux/xbps xclash - detect file conflicts between XBPS packages xdiff [-u] [DIR] - merge XBPS .new-* files xdistdir - figure out XBPS_DISTDIR + xdowngrade PKGS.xbps... - install XBPS package directly from .xbps file xgensum [-i] TEMPLATE - update SHA256 sums in templates xgrep PATTERN PKGS... - search files limited to XBPS package contents xlg PKG - open short commit log for XBPS template diff --git a/xdowngrade b/xdowngrade new file mode 100755 index 0000000..5467842 --- /dev/null +++ b/xdowngrade @@ -0,0 +1,13 @@ +#!/bin/sh -e +# xdowngrade PKGS.xbps... - install XBPS package directly from .xbps file + +T=$(mktemp --tmpdir -d xdowngrade-$(date -I).XXXXXXXX) +ln -s -t $T/ "$@" +xbps-rindex -a $T/* +pkg= +for f; do + f=${f##*/} + pkg="$pkg ${f%-*}" +done +xbps-install -i -R $T -f $pkg +rm -r $T -- cgit 1.4.1