mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-24 01:27:30 +02:00
deptest: Better detection of base directory
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23807 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
f00673e328
commit
7aa5b8a123
@ -1,23 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
DIR="$PWD/tmp/deptest"
|
||||
SCRIPTDIR="$(dirname "$0")"
|
||||
[ "${SCRIPTDIR:0:1}" = "/" ] || SCRIPTDIR="$PWD/$SCRIPTDIR"
|
||||
BASEDIR="$SCRIPTDIR/.."
|
||||
|
||||
DIR="$BASEDIR/tmp/deptest"
|
||||
STAMP_DIR_SUCCESS="$DIR/stamp-success"
|
||||
STAMP_DIR_FAILED="$DIR/stamp-failed"
|
||||
BUILD_DIR="$DIR/build"
|
||||
BUILD_DIR_HOST="$DIR/build_host"
|
||||
STAGING_DIR="$DIR/staging"
|
||||
STAGING_DIR_HOST="$DIR/staging_host"
|
||||
STAGING_DIR_HOST_TMPL="$DIR/staging_host_tmpl"
|
||||
BUILD_DIR="$DIR/build_dir/target"
|
||||
BUILD_DIR_HOST="$DIR/build_dir/host"
|
||||
STAGING_DIR="$DIR/staging_dir"
|
||||
STAGING_DIR_HOST="$DIR/staging_dir_host"
|
||||
STAGING_DIR_HOST_TMPL="$DIR/staging_dir_host_tmpl"
|
||||
LOG_DIR="$DIR/logs"
|
||||
|
||||
mkdir -p "$STAMP_DIR_SUCCESS" "$STAMP_DIR_FAILED" "$BUILD_DIR" "$LOG_DIR"
|
||||
|
||||
die()
|
||||
{
|
||||
echo "$@"
|
||||
exit 1
|
||||
}
|
||||
|
||||
[ -f "$BASEDIR/include/toplevel.mk" ] || \
|
||||
die "Error: Could not find buildsystem base directory"
|
||||
cd "$BASEDIR" || die "Failed to enter base directory"
|
||||
|
||||
mkdir -p "$STAMP_DIR_SUCCESS" "$STAMP_DIR_FAILED" "$BUILD_DIR" "$BUILD_DIR_HOST" "$LOG_DIR"
|
||||
|
||||
[ -d "$STAGING_DIR_HOST_TMPL" ] || {
|
||||
rm -rf staging_dir/host
|
||||
make tools/install V=99 || die "make tools/install failed, please check"
|
||||
|
Loading…
Reference in New Issue
Block a user