logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://anongit.hacktivis.me/git/pleroma.git/
commit: f28d9666fea012e55807647b88c1b60657e7cf47
parent 30ec7029e948ca47a3ac57f3d7986cbbe057b2c2
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sun,  4 Feb 2018 00:23:50 +0100

upgrade.sh: Create

Diffstat:

M.gitignore1+
Aupgrade.sh40++++++++++++++++++++++++++++++++++++++++
2 files changed, 41 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -16,6 +16,7 @@ # Prevent committing custom emojis /priv/static/emoji/custom/* +/config/emoji* # Generated on crash by the VM erl_crash.dump diff --git a/upgrade.sh b/upgrade.sh @@ -0,0 +1,40 @@ +#!/bin/sh +export MIX_ENV=${MIX_ENV:-prod} +cd $(dirname "$0") +WORKDIR="$(pwd)" + +# DEPRECATED: Use globbing on emoji/custom/**/*.png instead +generate_emojo_config() { + [ -f "${WORKDIR}/config/emoji.txt" ] && mv "${WORKDIR}/config/emoji.txt" "${WORKDIR}/config/emoji.txt.old" + cp "${WORKDIR}/config/emoji_pleroma.txt" "${WORKDIR}/config/emoji.txt" + cd "${WORKDIR}/priv/static" + for emoji_pack in $(find emoji/ -mindepth 1 -maxdepth 1 -type d) + do + emoji_pack_name=$(basename ${emoji_pack}) + find ${emoji_pack} -type f -iregex '.*\.png' | sed -r 's;.*/(.*)\.png;\1, /\0;g' >> "${WORKDIR}/config/emoji.txt" + done + cd "${WORKDIR}" +} + +# DEPRECATED: Custom emojis are configured in custom_emoji.txt +concat_emojo_config() { + [ -f "${WORKDIR}/config/emoji.txt" ] && mv "${WORKDIR}/config/emoji.txt" "${WORKDIR}/config/emoji.txt.old" + cat "${WORKDIR}/config/emoji_"*".txt" > "${WORKDIR}/config/emoji.txt" +} + +git_update() { + if git pull -f --rebase --autostash + then + echo "git pull -f --… made it!" + else + echo "git pull -f --… failed, going to the longer way?" + echo "Press Return to continue, SIGINT(^C) to abort:" + read + git checkout develop + git branch -D dev-lanodan2 + git pull + git checkout dev-lanodan2 + fi +} + +git_update && mix deps.get && mix compile && mix ecto.migrate