forked from andreasgal/B2G
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request andreasgal#299 from bgirard/master
Bug 937679 - Add fastxul.sh for fast XUL recompile & flash. r=mwu
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Support running with PWD=script or b2g root | ||
[ -e load-config.sh ] || cd .. | ||
|
||
B2G_DIR=$PWD | ||
. ./load-config.sh | ||
|
||
SCRIPT_NAME=$(basename $0) | ||
|
||
make -C "${GECKO_OBJDIR}" $MAKE_FLAGS binaries | ||
make -C "${GECKO_OBJDIR}" $MAKE_FLAGS package | ||
|
||
echo "Compressing xul" | ||
gzip --best -c "${GECKO_OBJDIR}/dist/b2g/libxul.so" > /tmp/b2g_libxul.so.gz | ||
adb remount | ||
echo adb push /tmp/b2g_libxul.so.gz /system/b2g/libxul.so.gz | ||
adb push /tmp/b2g_libxul.so.gz /system/b2g/libxul.so.gz | ||
|
||
adb shell stop b2g | ||
echo adb shell "gzip -d /system/b2g/libxul.so" | ||
adb shell "gzip -d /system/b2g/libxul.so" | ||
echo Restarting B2G | ||
adb shell start b2g | ||
|
||
echo "Reminder: ${SCRIPT_NAME} is a helper script to quickly update XUL when making" | ||
echo "c++ only changes that *only* affect libxul.so." |