new: Added htmlq

This commit is contained in:
Sayantan Santra 2023-07-28 02:03:27 -05:00
parent fe3ffd7cd7
commit 41ac6f3ede
Signed by: SinTan1729
GPG key ID: EB3E68BFBA25C85F
2 changed files with 35 additions and 7 deletions

View file

@ -14,7 +14,7 @@ sources=()
checksums=() checksums=()
version() { version() {
printf "$(curl -sL "https://api.github.com/repos/${git_repo}/releases/latest" | jq -r '.tag_name')" printf "$(curl -sL "https://api.github.com/repos/${git_repo}/releases/latest" | jq -r '.tag_name')"
} }
package() { package() {
@ -39,14 +39,13 @@ package() {
install -Dm644 "./${name}.1" "${pkgdir}/usr/local/share/man/man1/${name}.1" install -Dm644 "./${name}.1" "${pkgdir}/usr/local/share/man/man1/${name}.1"
install -Dm644 "./${name}-tmux.1" "${pkgdir}/usr/local/share/man/man1/${name}-tmux.1" install -Dm644 "./${name}-tmux.1" "${pkgdir}/usr/local/share/man/man1/${name}-tmux.1"
# Autocomplete # Autocomplete
command -v zsh &> /dev/null && install -Dm644 "./${name}.zsh" "${pkgdir}/usr/share/zsh/site-functions/_${name}" command -v zsh &>/dev/null && install -Dm644 "./${name}.zsh" "${pkgdir}/usr/share/zsh/site-functions/_${name}"
command -v bash &> /dev/null && install -Dm644 "./${name}.bash" "${pkgdir}/usr/share/bash-completion/completions/${name}" command -v bash &>/dev/null && install -Dm644 "./${name}.bash" "${pkgdir}/usr/share/bash-completion/completions/${name}"
# Key-bindings # Key-bindings
command -v fish &> /dev/null && install -Dm644 key-bindings.fish "${pkgdir}/usr/share/fish/vendor_functions.d/${name}_key_bindings.fish" command -v fish &>/dev/null && install -Dm644 key-bindings.fish "${pkgdir}/usr/share/fish/vendor_functions.d/${name}_key_bindings.fish"
command -v bash &> /dev/null && install -Dm644 key-bindings.bash "${pkgdir}/usr/share/${name}/key-bindings.bash" command -v bash &>/dev/null && install -Dm644 key-bindings.bash "${pkgdir}/usr/share/${name}/key-bindings.bash"
command -v zsh &> /dev/null && install -Dm644 key-bindings.zsh "${pkgdir}/usr/share/${name}/key-bindings.zsh" command -v zsh &>/dev/null && install -Dm644 key-bindings.zsh "${pkgdir}/usr/share/${name}/key-bindings.zsh"
# Notice # Notice
echo "For key-binding and completion to work with fish, some manual intervention is required" echo "For key-binding and completion to work with fish, some manual intervention is required"
echo "Look here for instructions: https://wiki.archlinux.org/title/fzf#fish" echo "Look here for instructions: https://wiki.archlinux.org/title/fzf#fish"
} }

29
htmlq/lure.sh Normal file
View file

@ -0,0 +1,29 @@
name='htmlq'
version=VERSION
release=1
desc='Like jq, but for HTML.'
homepage='https://github.com/mgdm/htmlq'
architectures=('amd64')
maintainer='SinTan1729'
license=('MIT')
provides=('htmlq')
conflicts=('htmlq')
git_repo='mgdm/htmlq'
sources=()
checksums=()
version() {
printf "$(curl -sL "https://api.github.com/repos/${git_repo}/releases/latest" | jq -r '.tag_name')"
}
package() {
# Pull sources
echo "Pulling ${name} ${version}"
curl -L "https://github.com/${git_repo}/releases/latest/download/htmlq-x86_64-linux.tar.gz" -o ${name}.tar.gz
# Build package
echo "Creating the package"
tar -xzf "${name}.tar.gz" -C .
# Binaries
install -Dm755 "./${name}" "${pkgdir}/usr/local/bin/${name}"
}