neko

WIP package manager written in POSIX shell inspired by VOID's xbps-src bash script (by kamber-linux)

neko reviews and mentions

Posts with mentions or reviews of neko. We have used some of these posts to build our list of alternatives and similar projects.
  • Aligning result of find in POSIX shell
    1 project | /r/commandline | 4 May 2021
    Hi! I'm working on a POSIX shell script package manager (you can here it here). Within the script, there is a function neko find. It works somewhat okay, and here is how it's defined: shift 1 case "$@" in "--help" | "-h") help find ;; esac [ -z "${1}" ] && usage find [ ! -d "${pkgs_dir}" ] && { neko_msg error "No srcpkgs directory found" neko_msg normal "Run ${0} init" exit } for arg do neko_msg normal "$(find "${pkgs_dir}" ! -name srcpkgs -prune -name "*${arg}*" | wc -l) result(s) found for ${arg}" find "${pkgs_dir}" ! -name srcpkgs -prune -name "*${arg}*" | while read -r line do . "${line}"/template 2>/dev/null # TODO # Find better way to find sub pkgs such as -devel # At the moment, one must type the exact name # e.g. neko find musl-devel if [ -n "$(command -v "$(echo "${arg}" | sed 's/\-/_/g')"_pkg)" ] then "$(echo "${arg}" | sed 's/\-/_/g')"_pkg fi # otherwise -git-_1 can occur if [ -n "${distfiles}" ] then printf "^[[1m%s^[[0m\t%s\n" "${pkgname}-${version}_${revision}" "${short_desc}" else printf "^[[1m%s^[[0m\t%s\n" "${pkgname}_${revision}" "${short_desc}" fi unset distfiles unset pkgname unset version unset revision unset short_desc done done The problem is the alignmnet. I could set something like printf "%30s\n" to force it to be 30 characters out. but this looks messy. I know this will involve a while loop keeping track of the length of the longest name. I know that the length of a var can be evaluated via ${#VARIABLE}. The goal is to have it dynamically aligned / spaced based off of the output. I would like a POSIX solution as the system I'm making this for won't have things like GNU Coreutils - it will have a suckless userspace and won't use bash but dash.

Stats

Basic neko repo stats
1
2
0.0
over 2 years ago

The primary programming language of neko is Shell.


Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com