upgrade.sh (1282B)
- #!/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