1
0
mirror of https://codeberg.org/kiss-community/kiss synced 2024-07-02 22:12:26 +00:00
Commit Graph

11 Commits

Author SHA1 Message Date
aabacchus
b815b07b7a
kiss-maintainer: quote for shellcheck (#76) 2022-09-24 00:25:50 +05:30
aabacchus
800d3ac854 kiss-maintainer: fix CRUX-style usage
Commit d94c811 changed `sort -u` to `uniq -u`; these are not equivalent.
`uniq -u` suppresses all duplicate lines, but `sort -u` removes all but
one. In the case of there being no command-line args, PWD is taken as
the package, and if that package is in a repo already in KISS_PATH, the
repo will be in KISS_PATH twice. This will cause the `kiss search`
command to give two entries for PWD, and `uniq -u` removes both.
Revert to `sort -u` to keep one of those entries.

If the package in PWD is not installed, there will be not entries left;
if it is installed, kiss-maintainer will try to get the history from
/var/db/kiss/installed/pkg, which is not a git repo.

Example of the incorrect behaviour:
    KISS_PATH=/home/me/repo/core
    PWD=/home/me/repo/core/musl
    $ sh -x /usr/bin/kiss-maintainer
    + '['  ]
    + export 'KISS_PATH=/home/me/repo/core::/home/me/repo/core'
    + set -- musl
    + kiss search musl
    + uniq -u
    + read -r repo
    + read -r repo
    + cd /var/db/kiss/installed/musl
    + git log -1 version
    + m=
    + :
    + m=
    + m=
    + '['  ]
    + continue
    + read -r repo

    (no output)
2022-08-05 21:24:43 +05:30
Jonathan Dahan
d94c811e7f Use full kiss subcommands for readability and safety 2020-09-04 13:32:19 -04:00
Jonathan Dahan
fb3ac1f7e9 Remove reference to crux in comments for those unfamiliar with it. 2020-09-04 13:31:30 -04:00
Camille Scholtz
d44c509b37 Add CRUX style usage using the current directory as the name of the package to be operated on 2020-08-30 22:28:01 +02:00
Dylan Araps
ad280931e5
contrib: Make doc strings match KISS' 2020-05-01 09:07:20 +03:00
Dylan Araps
6786d2ca0a
kiss: Unify usage outputs for all contrib scripts.
Seeing as how these utilities are now better integrated,
more effort should go into the overall interface between
what should be the "benchmark" or example kiss scripts.
2020-04-18 12:11:56 +03:00
Dylan Araps
fdf2775640
kiss: Integrate with user scripts.
kiss' help output will now include all executables found in $PATH
which begin with kiss-*. A comment string is optionally usable via
setting the second line of the script to a string.

Example:

...

This also means that 'kiss <script name>' is also possible now.
If I have a script in my $PATH called kiss-depends, I can now use
it via kiss with 'kiss depends'.
2020-04-18 11:39:37 +03:00
Dylan Araps
a4d26034c7
kiss-maintainer: Better output 2020-02-25 22:42:36 +02:00
Dylan Araps
d3cf21083f
kiss-maintainers: Fix bugs 2019-12-19 08:32:44 +00:00
Dylan Araps
49cfb7cac2
kiss: Merge kiss-utils and kiss 2019-10-30 10:51:48 +00:00