Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions packages/blackarch-helper/.SRCINFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
pkgbase = blackarch-helper
Comment thread
x0rgus marked this conversation as resolved.
Outdated
pkgdesc = TUI/CLI helper to manage and install tools from the BlackArch repository
pkgver = 1.1.0
pkgrel = 1
url = https://github.com/x0rgus/blackarch-helper
arch = any
groups = blackarch
license = MIT
depends = bash
depends = fzf
source = blackarch-helper
source = LICENSE
source = blackarch-helper.1
source = blackarch-helper.bash-completion
source = _blackarch-helper
sha512sums = SKIP
sha512sums = SKIP
sha512sums = SKIP
sha512sums = SKIP
sha512sums = SKIP

pkgname = blackarch-helper
21 changes: 21 additions & 0 deletions packages/blackarch-helper/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 Lucas Procópio

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
29 changes: 29 additions & 0 deletions packages/blackarch-helper/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=blackarch-helper
pkgver=2.1.0
pkgrel=1
pkgdesc="Helper to find, inspect, and build BlackArch packages from source using makepkg."
arch=('any')
url='https://github.com/x0rgus/blackarch-helper'
license=('MIT')
depends=('bash' 'curl' 'fzf')
source=("${pkgname}"
"LICENSE"
"${pkgname}.1"
"${pkgname}.bash-completion"
"_${pkgname}")
sha256sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP')

package() {
install -Dm755 "$srcdir/$pkgname" "$pkgdir/usr/bin/$pkgname"
install -Dm644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -Dm644 "$srcdir/${pkgname}.1" "${pkgdir}/usr/share/man/man1/${pkgname}.1"
install -Dm644 "$srcdir/${pkgname}.bash-completion" "${pkgdir}/usr/share/bash-completion/completions/${pkgname}"
install -Dm644 "$srcdir/_${pkgname}" "${pkgdir}/usr/share/zsh/site-functions/_${pkgname}"
}
47 changes: 47 additions & 0 deletions packages/blackarch-helper/_blackarch-helper
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#compdef blackarch-helper

_blackarch_helper() {
local -a commands
local state

commands=(
'sync:Download/update the local package database'
'interactive:Open the interactive menu'
'review:Review a PKGBUILD before building'
'install:Build and install a package from source'
'info:Show info for a specific package'
'search:Search for a package by keyword'
'clean-cache:Delete the local cache directory'
'help:Show the help message'
)

_arguments -C \
'1: :->command' \
'2: :->argument'

case $state in
command)
_describe "command" commands
;;
argument)
case $words[2] in
install|info|review)
local cache_file="${HOME}/.cache/blackarch-helper/tool_index.txt"
if [[ -f "$cache_file" ]]; then
# Suggest both base names and versioned names for convenience
local -a tools
tools=($(cut -d: -f2,3 "$cache_file" | sed 's/:/\n/' | sort -u))
_describe -t tools "tool" tools
else
_message "run 'sync' first to generate tool list"
fi
;;
search)
_message "keyword to search for"
;;
esac
;;
esac
}

_blackarch_helper "$@"
Loading