forked from fmarier/user-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfx-build
More file actions
executable file
·27 lines (23 loc) · 818 Bytes
/
fx-build
File metadata and controls
executable file
·27 lines (23 loc) · 818 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
#
# Examples:
#
# fx-build -v see the full gcc command line
# fx-build browser/components/preferences only build a portion of the code
OLD_CPU_GOVERNOR="$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)"
if [ "$OLD_CPU_GOVERNOR" != "performance" ] ; then
echo "WARNING: your main CPU is set to the $OLD_CPU_GOVERNOR governor, changing to the performance one."
sudo cpufreq performance
fi
pushd ~/devel/mozilla-unified
MOZCONFIG="$(pwd)/.mozconfig-desktop"
export MOZCONFIG
# shellcheck disable=SC2048,SC2086
eatmydata ionice nice ./mach --log-no-times build $*
RET=$?
popd
if [ "$OLD_CPU_GOVERNOR" != "performance" ] ; then
echo "Changing your CPU back to the $OLD_CPU_GOVERNOR governor."
sudo cpufreq "$OLD_CPU_GOVERNOR"
fi
exit $RET