This commit is contained in:
Antoine Martin 2023-05-03 20:38:42 -04:00
parent bee8a89443
commit a959a255de

View file

@ -47,7 +47,7 @@ _yarn_cache="yarn-cache"
## Sets up a local cache to prevent the redownloding the packages on rebuilds ## Sets up a local cache to prevent the redownloding the packages on rebuilds
_get_cache() { _get_cache() {
if [[ "$_yarn_cache" =~ ^/ ]]; then if [ "$_yarn_cache" =~ ^/ ]; then
printf "%s" "$_yarn_cache" printf "%s" "$_yarn_cache"
else else
printf "%s" "$srcdir/$_yarn_cache" printf "%s" "$srcdir/$_yarn_cache"
@ -75,7 +75,7 @@ prepare() {
# There are so many people # There are so many people
msg2 "Checking Node PATH" msg2 "Checking Node PATH"
local w_node=$(which node) local w_node=$(which node)
if [[ $w_node != "/usr/bin/node" ]]; then if [ $w_node != "/usr/bin/node" ]; then
msg2 "WARNING: Using path $w_node beware its not the defualt path, check if you are using nvm or similar" msg2 "WARNING: Using path $w_node beware its not the defualt path, check if you are using nvm or similar"
fi fi
@ -90,7 +90,7 @@ prepare() {
rm -r "$srcdir/joplin-$pkgver/packages/app-mobile" rm -r "$srcdir/joplin-$pkgver/packages/app-mobile"
rm -r "$srcdir/joplin-$pkgver/packages/app-clipper" rm -r "$srcdir/joplin-$pkgver/packages/app-clipper"
if [[ $pkgver == 2.9.17 ]]; then if [ $pkgver == 2.9.17 ]; then
# Temporary fix for 2.9.17 # Temporary fix for 2.9.17
# Let yarn resolve version ^2.12.1 of nan package to 2.17.0 instead of 2.15.0 (https://github.com/nodejs/nan/pull/943) # Let yarn resolve version ^2.12.1 of nan package to 2.17.0 instead of 2.15.0 (https://github.com/nodejs/nan/pull/943)
local package_json=$srcdir/joplin-$pkgver/package.json local package_json=$srcdir/joplin-$pkgver/package.json
@ -194,7 +194,7 @@ desktop() {
local -r src_icon_dir="$srcdir/joplin-$pkgver/packages/app-desktop/build/icons" local -r src_icon_dir="$srcdir/joplin-$pkgver/packages/app-desktop/build/icons"
local -i size local -i size
for size in 16 22 24 32 36 48 64 72 96 128 192 256 512; do for size in 16 22 24 32 36 48 64 72 96 128 192 256 512; do
[[ -f "$src_icon_dir/${size}x$size.png" ]] && install -Dm644 \ [ -f "$src_icon_dir/${size}x$size.png" ] && install -Dm644 \
"$src_icon_dir/${size}x$size.png" \ "$src_icon_dir/${size}x$size.png" \
"$pkgdir/usr/share/icons/hicolor/${size}x$size/apps/joplin.png" "$pkgdir/usr/share/icons/hicolor/${size}x$size/apps/joplin.png"
done done