diff --git a/files/update_mastodon.sh b/files/update_mastodon.sh index 936c7b8..0115c68 100755 --- a/files/update_mastodon.sh +++ b/files/update_mastodon.sh @@ -97,6 +97,8 @@ if [ "${DEBUG}" == "true" ]; then echo "Changing to Mastodon's home directory '${mastodon_home}'..." fi cd "${mastodon_home}/live" || exit 3 +# shellcheck disable=SC1091 +source "${mastodon_home}/.profile" current_tag=$(git name-rev --name-only HEAD | awk 'BEGIN {FS="/"} {print($2)}') if [ "${current_tag}" != "${tag}" ] || [ "${reinstall}" ]; then if [ "${DEBUG}" == "true" ]; then @@ -132,17 +134,17 @@ if [ "${current_tag}" != "${tag}" ] || [ "${reinstall}" ]; then echo "Running bundle install..." fi if [ "${dummy}" == "true" ]; then - echo sudo -u mastodon "${mastodon_home}/.rbenv/bin/bundle" install + echo sudo -u mastodon "${mastodon_home}/.rbenv/shims/bundle" install else - sudo -u mastodon "${mastodon_home}/.rbenv/bin/bundle" install + sudo -u mastodon "${mastodon_home}/.rbenv/shims/bundle" install fi if [ "${DEBUG}" == "true" ]; then echo "Running yarm install..." fi if [ "${dummy}" == "true" ]; then - echo sudo -u mastodon "${mastodon_home}/.rbenv/bin/yarn" install --frozen-lockfile + echo sudo -u mastodon "${mastodon_home}/live/bin/yarn" install --frozen-lockfile else - sudo -u mastodon "${mastodon_home}/.rbenv/bin/yarn" install --frozen-lockfile + sudo -u mastodon "${mastodon_home}/live/bin/yarn" install --frozen-lockfile fi if [ "${DEBUG}" == "true" ]; then echo "Restarting Mastodon services..."