Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

build: make build.sh independent of $PWD #32

Closed
wants to merge 1 commit into from

4 participants

@bnoordhuis

Users no longer need to cd /path/to/BrowserQuest/bin && ./build.sh, now /path/to/BrowserQuest/bin/build.sh is sufficient.

@bnoordhuis bnoordhuis build: make build.sh independent of $PWD
Users no longer need to `cd /path/to/BrowserQuest/bin && ./build.sh`,
now `/path/to/BrowserQuest/bin/build.sh` is sufficient.
33711d6
@kaomoji

"-not" should be replaced with "!" for POSIX compliance.

@kaomoji

"-delete" should be replaced with a POSIX-compliant solution.
(I am aware of the difficult task.)

@justinclift

@bnoordhuis Just committed your pull request to the repo here.

Trying to get all of the useful looking commits together in one spot, to make future development easier. :)

@nickdesaulniers

Thanks for taking a look at the source code for BrowserQuest! BrowserQuest was developed by Little Workshop on behalf of Mozilla to showcase how the Web is the ultimate cross platform for games.

Mozilla does not currently have the resources to maintain BrowserQuest, but you should check out some of these amazing community forks instead! Feel free to add your fork to the wiki.

English

Korean

Android

Windows Phone

Erlang based

  • sedrik/bqs - Erlang implementation of the BrowserQuest server

C++ based

Related

  • HabitRPG - A habit building program which treats your life like a Role Playing Game
    • Uses the BrowserQuest character icons (CC-licensed) for some of their stuff, and is looking to contribute back the icons they've developed since

No longer actively developed

French

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 28, 2012
  1. @bnoordhuis

    build: make build.sh independent of $PWD

    bnoordhuis authored
    Users no longer need to `cd /path/to/BrowserQuest/bin && ./build.sh`,
    now `/path/to/BrowserQuest/bin/build.sh` is sufficient.
This page is out of date. Refresh to see the latest.
Showing with 18 additions and 9 deletions.
  1. +18 −9 bin/build.sh
View
27 bin/build.sh
@@ -2,21 +2,30 @@
# Script to generate an optimized client build of BrowserQuest
-BUILDDIR="../client-build"
-PROJECTDIR="../client/js"
-CURDIR=$(pwd)
+TOPLEVELDIR="`dirname $0`/.."
+BUILDDIR="$TOPLEVELDIR/client-build"
+PROJECTDIR="$TOPLEVELDIR/client/js"
echo "Deleting previous build directory"
rm -rf $BUILDDIR
echo "Building client with RequireJS"
-cd $PROJECTDIR
-node ../../bin/r.js -o build.js
-cd $CURDIR
+node $TOPLEVELDIR/bin/r.js -o $PROJECTDIR/build.js
echo "Removing unnecessary js files from the build directory"
-find $BUILDDIR/js -type f -not \( -name "game.js" -o -name "home.js" -o -name "log.js" -o -name "require-jquery.js" -o -name "modernizr.js" -o -name "css3-mediaqueries.js" -o -name "mapworker.js" -o -name "detect.js" -o -name "underscore.min.js" -o -name "text.js" \) -delete
+find $BUILDDIR/js -type f \
+ -not \( -name "game.js" \
+ -o -name "home.js" \
+ -o -name "log.js" \
+ -o -name "require-jquery.js" \
+ -o -name "modernizr.js" \
+ -o -name "css3-mediaqueries.js" \
+ -o -name "mapworker.js" \
+ -o -name "detect.js" \
+ -o -name "underscore.min.js" \
+ -o -name "text.js" \) \
+ -delete
echo "Removing sprites directory"
rm -rf $BUILDDIR/sprites
@@ -25,6 +34,6 @@ echo "Removing config directory"
rm -rf $BUILDDIR/config
echo "Moving build.txt to current dir"
-mv $BUILDDIR/build.txt $CURDIR
+mv $BUILDDIR/build.txt $TOPLEVELDIR
-echo "Build complete"
+echo "Build complete"
Something went wrong with that request. Please try again.