-
-
Notifications
You must be signed in to change notification settings - Fork 686
Add blackarch-helper package #4579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
x0rgus
wants to merge
6
commits into
BlackArch:master
Choose a base branch
from
x0rgus:add-blackarch-helper
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| pkgbase = blackarch-helper | ||
| 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 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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}" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 "$@" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.