21 lines
614 B
Bash
Executable File
21 lines
614 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ -n "$BASH_SOURCE" ]; then
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
elif [ -n "$ZSH_NAME" ]; then
|
|
SCRIPT_DIR="$(cd "$(dirname "${(%):-%N}")" && pwd)"
|
|
else
|
|
echo "This script must be run with bash or zsh!" >&2
|
|
exit 1
|
|
fi
|
|
|
|
# ---- Configuration -------------------------------------------------
|
|
YOCTO_ROOT="$(cd $SCRIPT_DIR/.. && pwd)"
|
|
BUILD_DIR="${1:-build}"
|
|
|
|
CACHE_BASE="${YOCTO_ROOT}/.cache/yocto"
|
|
DL_DIR="${CACHE_BASE}/downloads"
|
|
SSTATE_DIR="${CACHE_BASE}/sstate"
|
|
|
|
POKY_DIR="${YOCTO_ROOT}/poky"
|
|
# ------------------------------------------------------------------- |