Skip to content

Instantly share code, notes, and snippets.

@safijari
Last active March 19, 2024 21:50
Show Gist options
  • Save safijari/3e7497c6cbf2b685faec4af7c3617431 to your computer and use it in GitHub Desktop.
Save safijari/3e7497c6cbf2b685faec4af7c3617431 to your computer and use it in GitHub Desktop.
Making/updating PRs for decky plugins
#!/bin/bash
# $1 should be name of folder
# $2 should be name of branch
# $3 should be a commit message
rm -rf /tmp/decky-plugin-database
cd /tmp
git clone [email protected]:YOURGITHUBHANDLE/decky-plugin-database
cd /tmp/decky-plugin-database
git fetch --all
git pull
git remote add upstream https://github.com/SteamDeckHomebrew/decky-plugin-database
git fetch --all
git pull
git merge upstream/main origin/main
git push --set-upstream origin main
if git show-ref --verify --quiet "refs/remotes/origin/$2"; then
git checkout -b "$2" "origin/$2"
else
git checkout -b "$2"
fi
git pull origin $2
git submodule update --init plugins/$1
cd plugins/$1
git pull origin main
cd ../..
git add plugins/$1
git commit -m "$3"
git push --set-upstream origin $2
@safijari
Copy link
Author

Remember to replace YOURGITHUBHANDLE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment