clean up and put to one file
This commit is contained in:
parent
9f4e7b9eae
commit
9fd5554cc0
4 changed files with 59 additions and 23 deletions
13
all.sh
13
all.sh
|
@ -1,13 +0,0 @@
|
||||||
#Discard uncommited changes
|
|
||||||
hg revert --all --no-backup
|
|
||||||
#Clean build
|
|
||||||
./mach clobber
|
|
||||||
#Update Mozilla repo
|
|
||||||
hg pull -u
|
|
||||||
./mach update
|
|
||||||
#Update patches
|
|
||||||
git clone https://weforgecode.xyz/Spitfire/Branding.git
|
|
||||||
#Configure and Build
|
|
||||||
./mach configure
|
|
||||||
./mach build
|
|
||||||
|
|
3
build.sh
3
build.sh
|
@ -1,3 +0,0 @@
|
||||||
#Configure and Build
|
|
||||||
./mach configure
|
|
||||||
./mach build
|
|
59
builder.sh
Normal file
59
builder.sh
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Define source paths
|
||||||
|
SOURCE_PATH="/home/user/mozilla-central"
|
||||||
|
SOURCE_REPO="https://hg.mozilla.org/mozilla-central"
|
||||||
|
|
||||||
|
# Function to download Firefox source if not present
|
||||||
|
download_source() {
|
||||||
|
if [ ! -d "$SOURCE_PATH" ]; then
|
||||||
|
echo "Firefox source not found. Cloning from repository..."
|
||||||
|
hg clone $SOURCE_REPO $SOURCE_PATH || { echo "Failed to clone Firefox repository. Exiting."; exit 1; }
|
||||||
|
else
|
||||||
|
echo "Firefox source already exists."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Function to discard uncommitted changes
|
||||||
|
discard_changes() {
|
||||||
|
echo "Discarding uncommitted changes..."
|
||||||
|
hg revert --all --no-backup
|
||||||
|
}
|
||||||
|
|
||||||
|
# Function to clean build
|
||||||
|
clean_build() {
|
||||||
|
echo "Cleaning build..."
|
||||||
|
./mach clobber
|
||||||
|
}
|
||||||
|
|
||||||
|
# Function to update Mozilla repository
|
||||||
|
update_repo() {
|
||||||
|
echo "Updating Mozilla repository..."
|
||||||
|
hg pull -u || { echo "Failed to update Mozilla repository. Exiting."; exit 1; }
|
||||||
|
./mach update || { echo "Failed to update Mozilla repository. Exiting."; exit 1; }
|
||||||
|
}
|
||||||
|
|
||||||
|
# Function to update patches
|
||||||
|
update_patches() {
|
||||||
|
echo "Updating patches..."
|
||||||
|
git clone https://weforgecode.xyz/Spitfire/Branding.git || { echo "Failed to clone patches repository. Exiting."; exit 1; }
|
||||||
|
}
|
||||||
|
|
||||||
|
# Function to configure and build Spitfire
|
||||||
|
configure_and_build() {
|
||||||
|
echo "Configuring Spitfire..."
|
||||||
|
./mach configure || { echo "Configuration failed. Exiting."; exit 1; }
|
||||||
|
|
||||||
|
echo "Building Spitfire..."
|
||||||
|
./mach build || { echo "Build failed. Exiting."; exit 1; }
|
||||||
|
}
|
||||||
|
|
||||||
|
# Main script execution
|
||||||
|
download_source
|
||||||
|
discard_changes
|
||||||
|
clean_build
|
||||||
|
update_repo
|
||||||
|
update_patches
|
||||||
|
configure_and_build
|
||||||
|
|
||||||
|
echo "Spitfire build completed successfully."
|
7
clean.sh
7
clean.sh
|
@ -1,7 +0,0 @@
|
||||||
#Discard uncommited changes
|
|
||||||
hg revert --all --no-backup
|
|
||||||
#Clean build
|
|
||||||
./mach clobber
|
|
||||||
#Update Mozilla repo
|
|
||||||
hg pull -u
|
|
||||||
./mach update
|
|
Loading…
Add table
Add a link
Reference in a new issue