aboutsummaryrefslogtreecommitdiff
path: root/binary_tarball/scripts/5_Configure_Binary_Tarball.sh
diff options
context:
space:
mode:
Diffstat (limited to 'binary_tarball/scripts/5_Configure_Binary_Tarball.sh')
-rwxr-xr-xbinary_tarball/scripts/5_Configure_Binary_Tarball.sh26
1 files changed, 24 insertions, 2 deletions
diff --git a/binary_tarball/scripts/5_Configure_Binary_Tarball.sh b/binary_tarball/scripts/5_Configure_Binary_Tarball.sh
index baa0e1f..582e7de 100755
--- a/binary_tarball/scripts/5_Configure_Binary_Tarball.sh
+++ b/binary_tarball/scripts/5_Configure_Binary_Tarball.sh
@@ -5,13 +5,19 @@ printf "\n\n--------------------------------- SETTINGS INTEGRATION -------------
BINARY_TARBALL=$1;
TOGGLE_SETTINGS_SCRIPT=$2;
LAUNCHER_SCRIPT=$3;
+CI_PROJECT_DIR=${CI_PROJECT_DIR:-$(realpath $(dirname $0)/../../)}
+OUTPUT_TARBALL=$CI_PROJECT_DIR/LibreWolf.${CARCH}.tar.bz2
_SCRIPT_FOLDER=$(realpath $(dirname $0));
_EXTRACTED_TARBALL_FOLDER=$_SCRIPT_FOLDER/librewolf;
_SETTINGS_REPO='https://gitlab.com/librewolf-community/settings.git';
+# Moves the packaged tarball to the specified location
+printf "\nMoving Binary Tarball to output location\n"
+mv $BINARY_TARBALL $OUTPUT_TARBALL
+
# Extracts the binary tarball
printf "\nExtracting librewolf binary tarball\n";
-tar -xf $BINARY_TARBALL -C $_EXTRACTED_TARBALL_FOLDER/..;
+tar -xf $OUTPUT_TARBALL -C $_EXTRACTED_TARBALL_FOLDER/..;
# Adds the librefox config files to the packaged tarball
printf "\nCopying librewolf settings to extracted binary tarball\n";
@@ -25,8 +31,24 @@ cp $LAUNCHER_SCRIPT $_EXTRACTED_TARBALL_FOLDER/launch_librewolf.sh;
# Somewhat crude workaround to use settings per default
# until we've worked out how to use `--install-settings` with links
# in all major packages instead
+printf "\nWorkaround: auto-enable Settings\n"
cp $_EXTRACTED_TARBALL_FOLDER/settings/* $_EXTRACTED_TARBALL_FOLDER;
+# Add distribution.ini
+distini="$_EXTRACTED_TARBALL_FOLDER/distribution/distribution.ini"
+
+install -Dvm644 /dev/stdin "$distini" <<END
+[Global]
+id=io.gitlab.${pkgname}
+version=1.0
+about=LibreWolf
+
+[Preferences]
+app.distributor="LibreWolf Community"
+app.distributor.channel=librewolf
+app.partner.librewolf=librewolf
+END
+
# Repacks the binary tarball
printf "\nRecompressing binary tarball\n";
-tar -jvcf $BINARY_TARBALL -C $_EXTRACTED_TARBALL_FOLDER .;
+tar -jvcf $OUTPUT_TARBALL -C $_EXTRACTED_TARBALL_FOLDER .;
bgstack15