<commit_before>#!/bin/bash

# Loads the adventure example app.
RUNVNC=false
FOREVER=false
LISTEN=false
CLONEARGS=
CLONESRC=https://github.com/uProxy/uproxy-lib.git
while getopts b:r:vwh? opt; do
    case $opt in
        b)
            CLONEARGS="$CLONEARGS -b $OPTARG"
            ;;
        r)
            CLONESRC=$OPTARG
            ;;
        v)
            RUNVNC=true
            ;;
        w)
            FOREVER=true
            ;;
        l)
            LISTEN=true
            ;;
        *)
            echo "$0 [-v] [-w] [-l] [-b branch] [-r repo]"
            echo "  -b: BRANCH is the branch to checkout instead of HEAD's referant."
            echo "  -r: REPO is the repository to clone instead of github.com/uProxy/uproxy-lib."
            echo "  -v: run a vncserver (port 5900 in the instance)"
            echo "  -w: after doing everything else, wait forever."
            echo "  -l: wait until the extension is listening."
            exit 1;
            ;;
    esac
done


# Overlap X startup with our download and build.
export DISPLAY=:10
Xvfb :10 -screen 0 1280x1024x24 &
fvwm &

if $RUNVNC; then
    x11vnc -display :10 -forever &
fi

mkdir -p /test/src
cd /test/src
npm install -g bower grunt-cli
echo git clone $CLONEARGS $CLONESRC
git clone $CLONEARGS $CLONESRC
cd uproxy-lib
./setup.sh install
grunt
grunt samples

/test/bin/browser.sh /test/src/uproxy-lib/build/dev/uproxy-lib/samples/adventure

<commit_msg>only need to build adventure<commit_after>#!/bin/bash

# Loads the adventure example app.
RUNVNC=false
FOREVER=false
LISTEN=false
CLONEARGS=
CLONESRC=https://github.com/uProxy/uproxy-lib.git
while getopts b:r:vwh? opt; do
    case $opt in
        b)
            CLONEARGS="$CLONEARGS -b $OPTARG"
            ;;
        r)
            CLONESRC=$OPTARG
            ;;
        v)
            RUNVNC=true
            ;;
        w)
            FOREVER=true
            ;;
        l)
            LISTEN=true
            ;;
        *)
            echo "$0 [-v] [-w] [-l] [-b branch] [-r repo]"
            echo "  -b: BRANCH is the branch to checkout instead of HEAD's referant."
            echo "  -r: REPO is the repository to clone instead of github.com/uProxy/uproxy-lib."
            echo "  -v: run a vncserver (port 5900 in the instance)"
            echo "  -w: after doing everything else, wait forever."
            echo "  -l: wait until the extension is listening."
            exit 1;
            ;;
    esac
done


# Overlap X startup with our download and build.
export DISPLAY=:10
Xvfb :10 -screen 0 1280x1024x24 &
fvwm &

if $RUNVNC; then
    x11vnc -display :10 -forever &
fi

mkdir -p /test/src
cd /test/src
npm install -g bower grunt-cli
echo git clone $CLONEARGS $CLONESRC
git clone $CLONEARGS $CLONESRC
cd uproxy-lib
./setup.sh install
grunt adventure

/test/bin/browser.sh /test/src/uproxy-lib/build/dev/uproxy-lib/samples/adventure


{'fraction_non_alphanumeric': 0.10446212383258388, 'fraction_numerical': 0.017295053614666205, 'mean_word_length': 1.8352941176470587, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2359468', 'n_tokens_mistral': 1038, 'n_tokens_neox': 964, 'n_words': 293}