2023-12-01 20:12:28 +00:00
|
|
|
#!/usr/bin/env bash
|
2023-12-01 20:17:32 +00:00
|
|
|
# This script installs/updates the Tangerine UI theme.
|
2023-12-01 20:12:28 +00:00
|
|
|
# Author - packetcat
|
|
|
|
|
|
|
|
# Tangerine UI repository directory
|
|
|
|
REPO="$HOME/TangerineUI-for-Mastodon"
|
|
|
|
# Mastodon install directory
|
|
|
|
INSTALLDIR="$HOME/live"
|
|
|
|
|
|
|
|
# Clone Tangerine UI repository if it doesn't exist
|
2023-12-01 20:17:32 +00:00
|
|
|
# If repo exists, just pull updates.
|
2023-12-01 20:12:28 +00:00
|
|
|
|
2023-12-01 20:17:32 +00:00
|
|
|
if [ ! -d "$REPO" ]; then
|
2023-12-01 20:12:28 +00:00
|
|
|
git clone https://github.com/nileane/TangerineUI-for-Mastodon.git $REPO
|
2023-12-01 20:17:32 +00:00
|
|
|
else
|
|
|
|
cd $REPO
|
|
|
|
git pull
|
2023-12-01 20:12:28 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Copy Tangerine UI files into your Mastodon install's styles directory
|
|
|
|
cp -vr $REPO/mastodon/app/javascript/styles/* $INSTALLDIR/app/javascript/styles
|
|
|
|
|
|
|
|
# Copy our themes.yml (Comment this out if you don't want to use this)
|
|
|
|
cp -v $REPO/mastodon/config/themes.yml $INSTALLDIR/config/themes.yml
|
|
|
|
|
|
|
|
cd $INSTALLDIR
|
|
|
|
RAILS_ENV=production bundle exec rails assets:precompile && echo "ALl done! Restart Mastodon processes for the changes to take effect!"
|
|
|
|
|