[Buildroot] [PATCH 1/4] scripts/package wizard: make workable from TOPDIR

Markus Heidelberg markus.heidelberg at web.de
Sun May 3 11:41:55 UTC 2009


Before you to had to be in a subdirectory, for example package/
Now you can call it from anywhere.

Signed-off-by: Markus Heidelberg <markus.heidelberg at web.de>
---
 scripts/add_new_package.wizard |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/scripts/add_new_package.wizard b/scripts/add_new_package.wizard
index 4ad72c9..bbcd7f6 100755
--- a/scripts/add_new_package.wizard
+++ b/scripts/add_new_package.wizard
@@ -49,10 +49,11 @@ URL=${DOWNLOAD_LOC%/*}
 TARBALL=${DOWNLOAD_LOC##*/}
 EXTENSION=${TARBALL##*.tar.}
 NAME_UPPER=`echo ${PACKAGE_NAME} | tr a-z- A-Z_`
+PACKAGE_DIR=`dirname $0`/../package/${PACKAGE_NAME}
 
-mkdir ../package/${PACKAGE_NAME}
+mkdir ${PACKAGE_DIR}
 
-cat > ../package/${PACKAGE_NAME}/${PACKAGE_NAME}.mk <<EOF
+cat > ${PACKAGE_DIR}/${PACKAGE_NAME}.mk <<EOF
 #############################################################
 #
 # ${PACKAGE_NAME}
@@ -73,7 +74,7 @@ ${NAME_UPPER}_DEPENDENCIES = uclibc ${EXTRA_DEPS}
 
 EOF
 
-cat > ../package/${PACKAGE_NAME}/Config.in <<EOF
+cat > ${PACKAGE_DIR}/Config.in <<EOF
 config BR2_PACKAGE_${NAME_UPPER}
 	bool "${PACKAGE_NAME}"
 	help
-- 
1.6.3.rc4.11.g6eda9



More information about the buildroot mailing list