5 Commits

2 changed files with 26 additions and 2 deletions

Binary file not shown.

24
sync_upstream.sh Normal file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
# Config
REPO_DIR="$HOME/Documents/kernel-source" # Change to your local clone path
UPSTREAM_URL="https://src.opensuse.org/pool/kernel-source.git"
BRANCH="factory"
cd "$REPO_DIR" || exit 1
echo ">>> Fetching upstream..."
# Add upstream if missing
git remote get-url upstream >/dev/null 2>&1 || git remote add upstream "$UPSTREAM_URL"
git fetch upstream
echo ">>> Checking out $BRANCH..."
git checkout "$BRANCH"
echo ">>> Merging upstream/$BRANCH..."
git merge "upstream/$BRANCH" --no-edit
echo ">>> Pushing to origin..."
git push origin "$BRANCH"
echo ">>> Done! Synced at $(date)"