From f5bb7e40cf684f036e2e5fc9f86cea9f7484face Mon Sep 17 00:00:00 2001 From: Georges-Antoine Assi Date: Thu, 6 Feb 2025 19:52:28 -0500 Subject: [PATCH] setup remote in push command --- README.md | 11 +++-------- push_wiki.sh | 3 +++ 2 files changed, 6 insertions(+), 8 deletions(-) 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 .