blob: be4e534061e7a87415531e957bfe331bffe985e6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#Maintainer: Kimiblock
pkgname=librewolf-extension-sponsorblock-bin
url="https://github.com/ajayyy/SponsorBlock"
pkgver=5.10.5
pkgrel=1
makedepends=("jq" "curl")
pkgdesc="Skip YouTube video sponsors."
arch=('any')
license=('LGPL-3.0-or-later')
_fileName='sponsorBlockerBETA@ajay.app.xpi'
function pkgver(){
_rawVersion=$(curl -s https://api.github.com/repos/ajayyy/SponsorBlock/releases/latest | jq .tag_name)
echo ${_rawVersion} | cut -c 2-$(expr ${#_rawVersion} - 1)
}
function package(){
mkdir -p "${pkgdir}"/usr/lib/librewolf/browser/extensions
_info "Downloading SponsorBlock ${pkgver}"
curl "https://github.com/ajayyy/SponsorBlock/releases/download/${pkgver}/FirefoxSignedInstaller.xpi" -o "${pkgdir}/usr/lib/librewolf/browser/extensions/${_fileName}" -L
chmod 0644 "${pkgdir}/usr/lib/librewolf/browser/extensions/${_fileName}"
}
function _info() {
if [ -f /usr/bin/pamac ]; then
echo " ==> [Info]: $@"
else
all_off="$(tput sgr0)"
bold="${all_off}$(tput bold)"
blue="${bold}$(tput setaf 4)"
yellow="${bold}$(tput setaf 3)"
printf "${blue}==>${yellow} [Info]:${bold} $1${all_off}\n"
fi
}
|