diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2014-09-03 11:26:52 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2014-09-03 11:26:52 +0400 |
commit | e7d78e10dfa379844f4364d9aed78ae13b6de9f8 (patch) | |
tree | d5422b8697bb7339e62bbdd98e0383c624735660 /misc | |
parent | 053f6c19be177621bce18b623a99b5549dcda22b (diff) | |
parent | 2beb117ff32fb631474b599876d3e97fa3c32a28 (diff) |
Merge branch 'master' into 4996_content_tracking
Diffstat (limited to 'misc')
-rwxr-xr-x | misc/composer/build-xhprof.sh | 17 | ||||
-rwxr-xr-x | misc/composer/clean-xhprof.sh | 12 |
2 files changed, 23 insertions, 6 deletions
diff --git a/misc/composer/build-xhprof.sh b/misc/composer/build-xhprof.sh index 46637f2bbb..95057dc26e 100755 --- a/misc/composer/build-xhprof.sh +++ b/misc/composer/build-xhprof.sh @@ -1,27 +1,32 @@ #!/bin/bash +if ! type phpize &> /dev/null; then + echo "phpize missing, skipping build" + echo "If you installed PHP via Aptitude, you can install phpize w/ 'sudo apt-get install php5-dev'" + exit +fi + +if ! type make &> /dev/null; then + echo "make missing, skipping build" + exit +fi + mkdir -p tmp/xhprof-logs cd vendor/facebook/xhprof/extension echo "Building xhprof..." -git fetch origin pull/33/head:33_pull_request -git merge 33_pull_request - -echo "Running phpize..." if ! phpize &> ../../../../tmp/xhprof-logs/phpize.log; then echo "Fatal error: phpize failed! View tmp/xhprof-logs/phpize.log for more info." exit 1 fi -echo "Running configure script..." if ! ./configure &> ../../../../tmp/xhprof-logs/configure.log; then echo "Fatal error: configure script failed! View tmp/xhprof-logs/configure.log for more info." exit 2 fi -echo "Building..." if ! make &> ../../../../tmp/xhprof-logs/make.log; then echo "Fatal error: could not build extension (make failed)! View tmp/xhprof-logs/make.log for more info." exit 3 diff --git a/misc/composer/clean-xhprof.sh b/misc/composer/clean-xhprof.sh new file mode 100755 index 0000000000..d20c17dd48 --- /dev/null +++ b/misc/composer/clean-xhprof.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# if xhprof exists but points to a non-master branch, checkout master so composer won't fail + +if [ -d "vendor/facebook/xhprof/extension" ]; then + cd vendor/facebook/xhprof/extension + + GIT_BRANCH=$(git symbolic-ref HEAD 2>/dev/null) + + git reset --hard &> /dev/null + git checkout master &> /dev/null +fi
\ No newline at end of file |