Handle missing LICENSE files gracefully

This commit is contained in:
Andrés Rodríguez
2020-07-16 15:45:48 -03:00
parent 54063ad8b6
commit 3072ede361
2 changed files with 5 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
pkgbase = brave-bin
pkgdesc = Web browser that blocks ads and trackers by default (binary release).
pkgver = 1.11.97
pkgrel = 1
pkgrel = 2
epoch = 1
url = https://brave.com/download
arch = x86_64

View File

@@ -9,7 +9,7 @@
pkgname=brave-bin
pkgver=1.11.97
pkgrel=1
pkgrel=2
epoch=1
pkgdesc="Web browser that blocks ads and trackers by default (binary release)."
arch=("x86_64")
@@ -49,5 +49,7 @@ package() {
install -Dm0644 "logo.png" "$pkgdir/usr/share/pixmaps/brave.png"
LICENSES_DIR="$pkgdir/usr/share/licenses/$pkgname"
mkdir -p "$LICENSES_DIR"
if [ -f "$pkgdir/usr/lib/$pkgname/LICENSE" ] && [ -f "$pkgdir/usr/lib/$pkgname/LICENSES.chromium.html" ]; then
mv "$pkgdir/usr/lib/$pkgname/"{LICENSE,LICENSES.chromium.html} "$LICENSES_DIR"
fi
}