split the installer stuff into a seperate shell script

This commit is contained in:
Bert van der Weerd 2021-02-05 23:15:23 +01:00 committed by ohfp
parent cc443a5cba
commit 08de8f365c
2 changed files with 40 additions and 39 deletions

View file

@ -152,30 +152,13 @@ package() {
installer_win() {
cd firefox-$pkgver
# apply the LibreWolf settings
cp -rv ../settings/* obj-x86_64-pc-mingw32/dist/librewolf
# recreate the zip file..
cd obj-x86_64-pc-mingw32/dist
rm -f librewolf-$pkgver.en-US.win64.txt librewolf-$pkgver.en-US.win64.zip
zip -r9 librewolf-$pkgver.en-US.win64.zip librewolf
/c/mozilla-source/Git/usr/bin/sha256sum.exe librewolf-$pkgver.en-US.win64.zip > librewolf-$pkgver.en-US.win64.zip.sha256sum
rm -f ../../../librewolf-$pkgver.en-US.win64.zip*
cp librewolf-$pkgver.en-US.win64.zip* ../../..
cd ../..
# there is just too much garbage in this installer function to
# have it all here..
. installer-win.sh
cd ..
}
installer_macos() {
cd firefox-$pkgver
# TODO: we want to apply the librewolf settings and make the .dmg file here.
echo 'build.sh: installer_macos() Not implemented yet.'
cd ..
}
# windows: change $PATH to find all the build tools in .mozbuild
# this might do the trick on macos aswell?
@ -188,6 +171,14 @@ fi
# process commandline arguments and do something
done_something=0
if [[ "$*" == *all* ]]; then
fetch
prepare
build
package
installer_win
done_something=1
else
if [[ "$*" == *fetch* ]]; then
fetch
done_something=1
@ -208,12 +199,11 @@ if [[ "$*" == *installer_win* ]]; then
installer_win
done_something=1
fi
if [[ "$*" == *installer_macos* ]]; then
installer_macos
done_something=1
fi
if (( done_something == 0 )); then
echo "Usage: $0 fetch | prepare | build | package | installer_win | installer_mac"
echo "Usage: $0 fetch | prepare | build | package | installer_win"
echo " use the parameter 'all' to just do everything."
exit
fi

11
installer-win.sh Normal file
View file

@ -0,0 +1,11 @@
# apply the LibreWolf settings
cp -rv ../settings/* obj-x86_64-pc-mingw32/dist/librewolf
# recreate the zip file..
cd obj-x86_64-pc-mingw32/dist
rm -f librewolf-$pkgver.en-US.win64.txt librewolf-$pkgver.en-US.win64.zip
zip -r9 librewolf-$pkgver.en-US.win64.zip librewolf
/c/mozilla-source/Git/usr/bin/sha256sum.exe librewolf-$pkgver.en-US.win64.zip > librewolf-$pkgver.en-US.win64.zip.sha256sum
rm -f ../../../librewolf-$pkgver.en-US.win64.zip*
cp librewolf-$pkgver.en-US.win64.zip* ../../..
cd ../..