aboutsummaryrefslogtreecommitdiff
path: root/scripts/_common.sh
diff options
context:
space:
mode:
authorTagadda <36127788+Tagadda@users.noreply.github.com>2022-01-24 14:08:41 +0000
committerTagada <36127788+Tagadda@users.noreply.github.com>2022-01-25 19:11:39 +0100
commit4df90d26467ac1f20f505cd82b131d697797ac0e (patch)
tree3813364f5c3452a69bd085a250af6346fe1658bd /scripts/_common.sh
parent0becd5049e4f5858c79e012934d557dbaa8706a6 (diff)
downloadmastodon_ynh-4df90d26467ac1f20f505cd82b131d697797ac0e.tar.gz
mastodon_ynh-4df90d26467ac1f20f505cd82b131d697797ac0e.tar.bz2
mastodon_ynh-4df90d26467ac1f20f505cd82b131d697797ac0e.zip
[enh] Workaround for bullseye
see https://github.com/mastodon/mastodon/issues/15751#issuecomment-873594463
Diffstat (limited to 'scripts/_common.sh')
-rw-r--r--scripts/_common.sh22
1 files changed, 22 insertions, 0 deletions
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
#=================================================