diff --git a/README.md b/README.md index 699f852..020b455 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,9 @@ ## Pushing to romm.wiki -First add the wiki as a remote: +Install [just](https://github.com/casey/just#installation) and run the `push` command: ```bash -git remote add wiki git@github.com:rommapp/romm.wiki.git -``` - -Then run this command from the project root: - -```bash -git push wiki main:master +chmod +x push_wiki.sh +just push ``` diff --git a/push_wiki.sh b/push_wiki.sh index 9d25a9d..b90ef5a 100755 --- a/push_wiki.sh +++ b/push_wiki.sh @@ -3,6 +3,9 @@ # Navigate to the /romm.wiki directory cd "$(dirname "$0")/romm.wiki" || exit 1 +# Check if the origin remote exists, if not add it +git remote | grep -q "^origin$" || git remote add origin git@github.com:rommapp/romm.wiki.git + # Add all files to git git add .