You've already forked mastodon-utils
mirror of
https://github.com/jakejarvis/mastodon-utils.git
synced 2025-06-27 17:25:42 -04:00
sturdier apply patches script
This commit is contained in:
@ -8,14 +8,18 @@ MASTODON_ROOT=/home/mastodon
|
||||
|
||||
if [ ! -d "$MASTODON_ROOT/scripts" ]
|
||||
then
|
||||
sudo -u mastodon git clone https://github.com/jakejarvis/mastodon-scripts.git ./scripts
|
||||
# clone repo
|
||||
sudo -u mastodon git clone https://github.com/jakejarvis/mastodon-scripts.git "$MASTODON_ROOT/scripts"
|
||||
|
||||
# fix permissions
|
||||
sudo chown -R mastodon:mastodon "$MASTODON_ROOT/scripts"
|
||||
sudo git config --global --add safe.directory "$MASTODON_ROOT/scripts"
|
||||
fi
|
||||
|
||||
# pull latest patches
|
||||
cd "$MASTODON_ROOT/scripts"
|
||||
sudo -u mastodon git fetch --all
|
||||
sudo -u mastodon git pull origin main
|
||||
|
||||
# apply custom patches
|
||||
cd "$MASTODON_ROOT/live"
|
||||
sudo -u mastodon git apply --allow-binary-replacement --whitespace=warn "$MASTODON_ROOT"/mastodon-scripts/patches/*.patch || true
|
||||
sudo -u mastodon git apply --allow-binary-replacement --whitespace=warn "$MASTODON_ROOT"/scripts/patches/*.patch || true
|
||||
|
Reference in New Issue
Block a user