16 lines
387 B
Plaintext
16 lines
387 B
Plaintext
|
#!/usr/bin/env bash
|
||
|
|
||
|
# ALPM package URL handler
|
||
|
# x-alpm-package://packagename
|
||
|
# install: xdg-mime default pamac-url-handler.desktop x-scheme-handler/x-alpm-package
|
||
|
|
||
|
packagename="${1#x-alpm-package://}"
|
||
|
echo "${packagename:0:4}"
|
||
|
if [[ "aur/" == "${packagename:0:4}" ]]; then
|
||
|
name="${packagename##*/}"
|
||
|
pamac-installer --build "$name"
|
||
|
exit 0
|
||
|
fi
|
||
|
pamac-installer "$packagename"
|
||
|
|