Created
October 23, 2013 15:13
-
-
Save oconnore/7120619 to your computer and use it in GitHub Desktop.
Extract a gaia build for debugging : ./get-build.sh <system> [<cat-path>] ... for example: ./get-build.sh clock js/startup.js
This file contains hidden or 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
#!/bin/sh | |
set -e | |
rm -r extracted | |
mkdir -p extracted | |
FOUND=`find profile/webapps/ -name "$1".gaiamobile.org | wc -l` | |
if [ "$FOUND" -gt 0 ]; then | |
APP="$1" | |
TARGET="profile/webapps/$1.gaiamobile.org/" | |
else | |
APP=`echo $1 | sed 's/^\([A-Za-z0-9]\+\)\..*$/\1/g'` | |
TARGET="profile/webapps/$1/" | |
fi | |
cp $TARGET/application.zip extracted/application.zip | |
cd extracted | |
unzip application.zip >/dev/null 2>&1 | |
if [ -n "$2" -a -z "$3" ]; then | |
# no line number printed | |
cat "$2" | |
elif [ -n "$2" -a -n "$3" ]; then | |
# attempt to match lines | |
echo hi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment