From 8a08f528510bdecd2919de9cd8e2c2e4edd9dca4 Mon Sep 17 00:00:00 2001 From: Faerbit Date: Sat, 15 Sep 2018 10:46:26 +0200 Subject: [PATCH] Add lpkg. --- Makefile | 1 + Readme.md | 5 +++++ src/lpkg | 18 ++++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100755 src/lpkg diff --git a/Makefile b/Makefile index 4cd9742..4a7ae81 100644 --- a/Makefile +++ b/Makefile @@ -14,5 +14,6 @@ install: install -d -m 755 $(DESTDIR)$(BINDIR) install -m 755 src/cpkg $(DESTDIR)$(BINDIR) install -m 755 src/qpkg $(DESTDIR)$(BINDIR) + install -m 755 src/lpkg $(DESTDIR)$(BINDIR) install -m 755 src/ipkg $(DESTDIR)$(BINDIR) install -m 755 src/rpkg $(DESTDIR)$(BINDIR) diff --git a/Readme.md b/Readme.md index 28f9f99..1c35af6 100644 --- a/Readme.md +++ b/Readme.md @@ -34,6 +34,11 @@ cpkg make install # DESTDIR is set by cpkg qpkg foo ``` +**l**ist **p**ac**k**a**g**e contents: +``` bash +lpkg foo +``` + **i**nstall **p**ac**k**a**g**e: ``` bash ipkg foo diff --git a/src/lpkg b/src/lpkg new file mode 100755 index 0000000..61af826 --- /dev/null +++ b/src/lpkg @@ -0,0 +1,18 @@ +#!/bin/bash + +PKGDIR="${FPKG_ROOT}/pkg" + +if [ $# -ne 1 ] +then + echo "Did not specify exactly one argument" + exit 1 +fi + +pkg_version=$(qpkg "$1") +if [ $? -ne 0 ] +then + echo $pkg_version + exit 1 +fi + +zstd -qcd "$PKGDIR/$1-$pkg_version.tar.zst" | tar tf -