From 76d298ac8d224662b2cc04f891fa56c2453dfe77 Mon Sep 17 00:00:00 2001 From: Faerbit Date: Sat, 15 Sep 2018 10:53:21 +0200 Subject: [PATCH] Implemented ipkg. --- src/ipkg | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/ipkg b/src/ipkg index bde2317..3cc0e93 100755 --- a/src/ipkg +++ b/src/ipkg @@ -1,4 +1,20 @@ #!/bin/bash -echo "Not yet implemented" -exit 1 +PKGDIR="${FPKG_ROOT}/pkg" +DESTDIR="${FPKG_ROOT}/" + +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 + +cd "$DESTDIR" +zstd -qcd "$PKGDIR/$1-$pkg_version.tar.zst" | tar vxf - --same-owner