From 3379ed0351ab179e7445735ae3355298cae05a2b Mon Sep 17 00:00:00 2001 From: Bert van der Weerd Date: Tue, 14 Nov 2023 19:53:25 +0100 Subject: [PATCH] Added settings submodule --- .gitmodules | 3 +++ scripts/librewolf-patches.py | 6 +++--- scripts/update_settings.sh | 22 ++++++++++++++++++++++ settings | 1 + 4 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 scripts/update_settings.sh create mode 160000 settings diff --git a/.gitmodules b/.gitmodules index e69de29..7709269 100644 --- a/.gitmodules +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "settings"] + path = settings + url = https://codeberg.org/librewolf/settings.git diff --git a/scripts/librewolf-patches.py b/scripts/librewolf-patches.py index 42e939d..9982979 100755 --- a/scripts/librewolf-patches.py +++ b/scripts/librewolf-patches.py @@ -117,9 +117,9 @@ def librewolf_patches(): exec('mkdir -p lw') enter_srcdir('lw') - exec('wget -q https://codeberg.org/librewolf/settings/raw/branch/master/librewolf.cfg') - exec('wget -q https://codeberg.org/librewolf/settings/raw/branch/master/distribution/policies.json') - exec('wget -q https://codeberg.org/librewolf/settings/raw/branch/master/defaults/pref/local-settings.js') + exec('cp -v ../../settings/librewolf.cfg .') + exec('cp -v ../../settings/distribution/policies.json .') + exec('cp -v ../../settings/defaults/pref/local-settings.js .') leave_srcdir(); diff --git a/scripts/update_settings.sh b/scripts/update_settings.sh new file mode 100644 index 0000000..abb22f8 --- /dev/null +++ b/scripts/update_settings.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# Navigate to the root directory of your repository +cd /path/to/your/repo + +# Update the submodule +echo "Checking for updates in the settings submodule..." +cd settings +git checkout master +git pull origin master +cd .. + +# Check if there are any changes +if [ -n "$(git diff --submodule)" ]; then + echo "Updates found in the submodule. Committing them..." + git add settings + git commit -m "Updated settings submodule to the latest version" + git push + echo "Updates committed and pushed." +else + echo "No updates in the submodule." +fi diff --git a/settings b/settings new file mode 160000 index 0000000..b587388 --- /dev/null +++ b/settings @@ -0,0 +1 @@ +Subproject commit b587388bdbe63511c478cb8b5f82c2e80040414c