You've already forked mastodon-utils
mirror of
https://github.com/jakejarvis/mastodon-utils.git
synced 2025-06-27 17:25:42 -04:00
apply patches during upgrade script
This commit is contained in:
21
scripts/apply_patches.sh
Executable file
21
scripts/apply_patches.sh
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
# exit when any step fails
|
||||
set -euo pipefail
|
||||
|
||||
# default paths
|
||||
MASTODON_ROOT=/home/mastodon
|
||||
|
||||
if [ ! -d "$MASTODON_ROOT/scripts" ]
|
||||
then
|
||||
sudo -u mastodon git clone https://github.com/jakejarvis/mastodon-scripts.git ./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
|
0
scripts/tootctl_shim.sh
Normal file → Executable file
0
scripts/tootctl_shim.sh
Normal file → Executable file
3
scripts/upgrade_glitch.sh
Normal file → Executable file
3
scripts/upgrade_glitch.sh
Normal file → Executable file
@ -20,6 +20,9 @@ sudo -u mastodon git fetch --all
|
||||
sudo -u mastodon git checkout glitch-soc/main
|
||||
sudo -u mastodon git pull glitch-soc main
|
||||
|
||||
# pull & apply latest patches
|
||||
. $(dirname "$0")/apply_patches.sh
|
||||
|
||||
# update dependencies
|
||||
echo "Updating deps..."
|
||||
sudo -u mastodon "$RBENV_ROOT/shims/bundle" install --jobs "$(getconf _NPROCESSORS_ONLN)"
|
||||
|
0
scripts/version.sh
Normal file → Executable file
0
scripts/version.sh
Normal file → Executable file
0
scripts/weekly_cleanup.sh
Normal file → Executable file
0
scripts/weekly_cleanup.sh
Normal file → Executable file
Reference in New Issue
Block a user