added better error checking to prepare for use in a shared runner
This commit is contained in:
parent
91ecd2c47e
commit
5265f522ce
2 changed files with 21 additions and 3 deletions
12
build.sh
12
build.sh
|
|
@ -10,8 +10,9 @@ pkgver=85.0.2
|
||||||
|
|
||||||
fetch() {
|
fetch() {
|
||||||
# fetch the firefox source.
|
# fetch the firefox source.
|
||||||
rm -vf firefox-$pkgver.source.tar.xz
|
rm -f firefox-$pkgver.source.tar.xz
|
||||||
wget https://archive.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz
|
wget https://archive.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz
|
||||||
|
if [ ! -f firefox-$pkgver.source.tar.xz ]; then exit 1; fi
|
||||||
|
|
||||||
# the settings and common submodules should be checked out with --recursive to allow the build
|
# the settings and common submodules should be checked out with --recursive to allow the build
|
||||||
|
|
||||||
|
|
@ -19,8 +20,11 @@ fetch() {
|
||||||
echo 'Getting patches..'
|
echo 'Getting patches..'
|
||||||
rm -f megabar.patch remove_addons.patch unity-menubar.patch
|
rm -f megabar.patch remove_addons.patch unity-menubar.patch
|
||||||
wget -q https://gitlab.com/librewolf-community/browser/linux/-/raw/master/megabar.patch
|
wget -q https://gitlab.com/librewolf-community/browser/linux/-/raw/master/megabar.patch
|
||||||
|
if [ ! -f megabar.patch ]; then exit 1; fi
|
||||||
wget -q https://gitlab.com/librewolf-community/browser/linux/-/raw/master/remove_addons.patch
|
wget -q https://gitlab.com/librewolf-community/browser/linux/-/raw/master/remove_addons.patch
|
||||||
|
if [ ! -f remove_addons.patch ]; then exit 1; fi
|
||||||
wget -q https://gitlab.com/librewolf-community/browser/linux/-/raw/master/unity-menubar.patch
|
wget -q https://gitlab.com/librewolf-community/browser/linux/-/raw/master/unity-menubar.patch
|
||||||
|
if [ ! -f unity-menubar.patch ]; then exit 1; fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -31,6 +35,7 @@ prepare() {
|
||||||
echo "Extracting firefox-$pkgver.source.tar.xz ..."
|
echo "Extracting firefox-$pkgver.source.tar.xz ..."
|
||||||
tar xf firefox-$pkgver.source.tar.xz
|
tar xf firefox-$pkgver.source.tar.xz
|
||||||
|
|
||||||
|
if [ ! -d firefox-$pkgver ]; then exit 1; fi
|
||||||
cd firefox-$pkgver
|
cd firefox-$pkgver
|
||||||
|
|
||||||
cat >../mozconfig <<END
|
cat >../mozconfig <<END
|
||||||
|
|
@ -133,22 +138,27 @@ END
|
||||||
|
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
|
if [ ! -d firefox-$pkgver ]; then exit 1; fi
|
||||||
cd firefox-$pkgver
|
cd firefox-$pkgver
|
||||||
./mach build
|
./mach build
|
||||||
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
cd ..
|
cd ..
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
|
if [ ! -d firefox-$pkgver ]; then exit 1; fi
|
||||||
cd firefox-$pkgver
|
cd firefox-$pkgver
|
||||||
./mach package
|
./mach package
|
||||||
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
cd ..
|
cd ..
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
installer_win() {
|
installer_win() {
|
||||||
|
if [ ! -d firefox-$pkgver ]; then exit 1; fi
|
||||||
cd firefox-$pkgver
|
cd firefox-$pkgver
|
||||||
|
|
||||||
# there is just too much garbage in this installer function to
|
# there is just too much garbage in this installer function to
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
# sanity checks
|
||||||
|
if [ ! -d obj-x86_64-pc-mingw32/dist ]; then exit 1; fi
|
||||||
|
|
||||||
# apply the LibreWolf settings
|
# apply the LibreWolf settings
|
||||||
cp -rv ../settings/* obj-x86_64-pc-mingw32/dist/librewolf
|
cp -rv ../settings/* obj-x86_64-pc-mingw32/dist/librewolf
|
||||||
|
|
||||||
|
|
@ -8,7 +11,9 @@ cd obj-x86_64-pc-mingw32/dist
|
||||||
# be sure to remove the previous zip file..
|
# be sure to remove the previous zip file..
|
||||||
rm -vf librewolf-$pkgver.en-US.win64.txt librewolf-$pkgver.en-US.win64.zip
|
rm -vf librewolf-$pkgver.en-US.win64.txt librewolf-$pkgver.en-US.win64.zip
|
||||||
zip -r9 librewolf-$pkgver.en-US.win64.zip librewolf
|
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
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
|
sha256sum.exe librewolf-$pkgver.en-US.win64.zip > librewolf-$pkgver.en-US.win64.zip.sha256sum
|
||||||
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
# copy the resulting zip file
|
# copy the resulting zip file
|
||||||
rm -vf ../../../librewolf-$pkgver.en-US.win64.zip*
|
rm -vf ../../../librewolf-$pkgver.en-US.win64.zip*
|
||||||
cp -v librewolf-$pkgver.en-US.win64.zip* ../../..
|
cp -v librewolf-$pkgver.en-US.win64.zip* ../../..
|
||||||
|
|
@ -111,7 +116,10 @@ END
|
||||||
pushd ..
|
pushd ..
|
||||||
rm -vrf librewolf
|
rm -vrf librewolf
|
||||||
unzip librewolf-$pkgver.en-US.win64.zip
|
unzip librewolf-$pkgver.en-US.win64.zip
|
||||||
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
cp -v common/source_files/browser/branding/librewolf/firefox.ico librewolf/librewolf.ico
|
cp -v common/source_files/browser/branding/librewolf/firefox.ico librewolf/librewolf.ico
|
||||||
makensis-3.01.exe installer_win.nsi
|
makensis-3.01.exe installer_win.nsi
|
||||||
/c/mozilla-source/Git/usr/bin/sha256sum.exe librewolf-$pkgver.en-US.win64-setup.exe > librewolf-$pkgver.en-US.win64-setup.exe.sha256sum
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
|
sha256sum.exe librewolf-$pkgver.en-US.win64-setup.exe > librewolf-$pkgver.en-US.win64-setup.exe.sha256sum
|
||||||
|
if [ $? -ne 0 ]; then exit 1; fi
|
||||||
popd
|
popd
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue