scripts/package wizard: make workable from TOPDIR
authorMarkus Heidelberg <markus.heidelberg@web.de>
Sun, 3 May 2009 11:41:55 +0000 (13:41 +0200)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sun, 3 May 2009 20:24:36 +0000 (22:24 +0200)
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@web.de>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
scripts/add_new_package.wizard

index 4ad72c935b3a4d18e039bc6cbad1f3842f22f63a..bbcd7f66b98b4a5cf5c72817826cebb3b730de73 100755 (executable)
@@ -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