#! /usr/bin/env bash

# {{ ansible_managed }}

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
    eval "$(dircolors -b)"
    alias ls='ls --color=auto'
    alias grep='grep --color=auto'
    alias fgrep='fgrep --color=auto'
    alias egrep='egrep --color=auto'
fi

# some more ls aliases
alias ll='ls -Al'
alias la='ls -A'


source "{{ item.home }}/{{ item.env }}"

# If X11 forwarding is enabled, then use the DISPLAY value
# already set and use the X11 session cookie
if [ -n "$DISPLAY" ]; then
    export XAUTHORITY="{{ localdev_xauthority }}"

# Otherwise, configure the display to use the virtual frame buffer
else
    export DISPLAY="{{ localdev_xvfb_display }}"
fi

cd "{{ item.home }}/{{ item.repo }}"

source "{{ item.home }}/.paver_autocomplete"

export JSCOVER_JAR="/usr/local/bin/JSCover-all-{{ localdev_jscover_version }}.jar"
