Add qpkg.
This commit is contained in:
parent
06522db0aa
commit
9ace44f799
1
Makefile
1
Makefile
@ -13,5 +13,6 @@ help:
|
|||||||
install:
|
install:
|
||||||
install -d -m 755 $(DESTDIR)$(BINDIR)
|
install -d -m 755 $(DESTDIR)$(BINDIR)
|
||||||
install -m 755 src/cpkg $(DESTDIR)$(BINDIR)
|
install -m 755 src/cpkg $(DESTDIR)$(BINDIR)
|
||||||
|
install -m 755 src/qpkg $(DESTDIR)$(BINDIR)
|
||||||
install -m 755 src/ipkg $(DESTDIR)$(BINDIR)
|
install -m 755 src/ipkg $(DESTDIR)$(BINDIR)
|
||||||
install -m 755 src/rpkg $(DESTDIR)$(BINDIR)
|
install -m 755 src/rpkg $(DESTDIR)$(BINDIR)
|
||||||
|
@ -10,6 +10,7 @@ something useful.
|
|||||||
* zstd
|
* zstd
|
||||||
* tar
|
* tar
|
||||||
* coreutils
|
* coreutils
|
||||||
|
* findutils
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
``` bash
|
``` bash
|
||||||
@ -28,6 +29,10 @@ mkdir /pkg # folder for storing packages
|
|||||||
cd build_dir/of/foo
|
cd build_dir/of/foo
|
||||||
cpkg make install # DESTDIR is set by cpkg
|
cpkg make install # DESTDIR is set by cpkg
|
||||||
```
|
```
|
||||||
|
**q**ist **p**ac**k**a**g**e version:
|
||||||
|
``` bash
|
||||||
|
qpkg foo
|
||||||
|
```
|
||||||
|
|
||||||
**i**nstall **p**ac**k**a**g**e:
|
**i**nstall **p**ac**k**a**g**e:
|
||||||
``` bash
|
``` bash
|
||||||
|
21
src/qpkg
Executable file
21
src/qpkg
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
PKGDIR="${FPKG_ROOT}/pkg"
|
||||||
|
|
||||||
|
if [ $# -ne 1 ]
|
||||||
|
then
|
||||||
|
echo "Did not specify exactly one argument"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
version=$(find $PKGDIR -regex ".*/$1-[a-z.0-9]*.tar.zst" -type f -printf "%f\n" | sort -V | tail -n 1)
|
||||||
|
|
||||||
|
if [ "$version" = "" ]
|
||||||
|
then
|
||||||
|
echo "Package not found"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
version=${version##*-}
|
||||||
|
version=${version%.tar.zst}
|
||||||
|
echo $version
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user