From 03cd9df2b604fc833f8213f44b49daac3a39763a Mon Sep 17 00:00:00 2001 From: Tagadda <36127788+Tagadda@users.noreply.github.com> Date: Mon, 24 Jan 2022 14:08:41 +0000 Subject: [enh] Workaround for bullseye see https://github.com/mastodon/mastodon/issues/15751#issuecomment-873594463 --- scripts/_common.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'scripts/_common.sh') diff --git a/scripts/_common.sh b/scripts/_common.sh index c861376..168251c 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -13,6 +13,28 @@ RUBY_VERSION="2.7.2" NODEJS_VERSION="12" +# Workaround for Mastodon on Bullseye +# See https://github.com/mastodon/mastodon/issues/15751#issuecomment-873594463 +if [ "$(lsb_release --codename --short)" = "bullseye" ]; then + case $YNH_ARCH in + amd64) + arch="x86_64" + ;; + arm64) + arch="aarch64" + ;; + armel|armhf) + arch="arm" + ;; + i386) + arch="i386" + ;; + esac + ld_preload="LD_PRELOAD=/usr/lib/$arch-linux-gnu/libjemalloc.so" +else + ld_preload="" +fi + #================================================= # PERSONAL HELPERS #================================================= -- cgit v1.2.3-70-g09d2