logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git

upgrade.sh (1282B)


  1. #!/bin/sh
  2. export MIX_ENV=${MIX_ENV:-prod}
  3. cd $(dirname "$0")
  4. WORKDIR="$(pwd)"
  5. # DEPRECATED: Use globbing on emoji/custom/**/*.png instead
  6. generate_emojo_config() {
  7. [ -f "${WORKDIR}/config/emoji.txt" ] && mv "${WORKDIR}/config/emoji.txt" "${WORKDIR}/config/emoji.txt.old"
  8. cp "${WORKDIR}/config/emoji_pleroma.txt" "${WORKDIR}/config/emoji.txt"
  9. cd "${WORKDIR}/priv/static"
  10. for emoji_pack in $(find emoji/ -mindepth 1 -maxdepth 1 -type d)
  11. do
  12. emoji_pack_name=$(basename ${emoji_pack})
  13. find ${emoji_pack} -type f -iregex '.*\.png' | sed -r 's;.*/(.*)\.png;\1, /\0;g' >> "${WORKDIR}/config/emoji.txt"
  14. done
  15. cd "${WORKDIR}"
  16. }
  17. # DEPRECATED: Custom emojis are configured in custom_emoji.txt
  18. concat_emojo_config() {
  19. [ -f "${WORKDIR}/config/emoji.txt" ] && mv "${WORKDIR}/config/emoji.txt" "${WORKDIR}/config/emoji.txt.old"
  20. cat "${WORKDIR}/config/emoji_"*".txt" > "${WORKDIR}/config/emoji.txt"
  21. }
  22. git_update() {
  23. if git pull -f --rebase --autostash
  24. then
  25. echo "git pull -f --… made it!"
  26. else
  27. echo "git pull -f --… failed, going to the longer way?"
  28. echo "Press Return to continue, SIGINT(^C) to abort:"
  29. read
  30. git checkout develop
  31. git branch -D dev-lanodan2
  32. git pull
  33. git checkout dev-lanodan2
  34. fi
  35. }
  36. git_update && mix deps.get && mix compile && mix ecto.migrate