Skip to content

Commit 59f9242

Browse files
committed
Update from upstream script updated
1 parent 0a2a94c commit 59f9242

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

update_from_upstream.sh

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,32 @@
11
#!/bin/bash
22

3-
git fetch https://github.com/flathub/net.rpcs3.RPCS3 master # Fetch the latest changes from the remote master branch
4-
git merge FETCH_HEAD # Merge the fetched changes into your current branch
3+
target_branch="master"
4+
update_submodules="true"
5+
6+
# Get the repository name
7+
repo_url=$(git remote get-url origin)
8+
repo_name=$(basename -s .git "$repo_url")
9+
10+
echo "Fetching https://github.com/flathub/$repo_name $target_branch"
11+
if [ "$update_submodules" = "true" ]; then
12+
echo "And updating submodules also"
13+
fi
14+
echo ""
15+
16+
# Fetch the latest changes from the remote master branch
17+
git fetch https://github.com/flathub/"$repo_name" "$target_branch"
18+
19+
# Merge the fetched changes into your current branch
20+
git merge FETCH_HEAD
21+
22+
if [ "$update_submodules" = "true" ]; then
23+
# Update submodules to the versions specified in the repo
24+
git submodule update --init --recursive
25+
26+
# Update submodules to the versions specified in the fetched repo
27+
git submodule update --remote
28+
git add shared-modules
29+
git commit -m "Update shared modules"
30+
fi
31+
32+

0 commit comments

Comments
 (0)