summary refs log tree commit diff
path: root/xdowngrade
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2015-01-02 12:14:17 +0100
committerChristian Neukirchen <chneukirchen@gmail.com>2015-01-02 12:14:17 +0100
commitc820f72b1af215bdb4dd73377ac734722e8ad124 (patch)
tree41bc07e790155b3917aef156a3e48288f989d728 /xdowngrade
parent73d3cecc0959e00449c5125d7bc1c1d7d5c8ab26 (diff)
downloadxtools-c820f72b1af215bdb4dd73377ac734722e8ad124.tar.gz
xtools-c820f72b1af215bdb4dd73377ac734722e8ad124.tar.xz
xtools-c820f72b1af215bdb4dd73377ac734722e8ad124.zip
add xdowngrade
Diffstat (limited to 'xdowngrade')
-rwxr-xr-xxdowngrade13
1 files changed, 13 insertions, 0 deletions
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