From 4a29b224386aedbf19149a2b08d40f7ace065044 Mon Sep 17 00:00:00 2001 From: Markus Heidelberg Date: Sun, 3 May 2009 13:41:57 +0200 Subject: scripts/package wizard: add support for subdirs Signed-off-by: Markus Heidelberg Signed-off-by: Peter Korsgaard --- scripts/add_new_package.wizard | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/add_new_package.wizard b/scripts/add_new_package.wizard index d4127f422..902718da8 100755 --- a/scripts/add_new_package.wizard +++ b/scripts/add_new_package.wizard @@ -42,6 +42,16 @@ else STAGING="NO" fi +echo "Enter an additional subdirectory below package/" +echo "as category, or just press enter." +read SUB_DIR + +if [ -z "$SUB_DIR" ]; then + CATEGORY_DIR=package +else + CATEGORY_DIR=package/${SUB_DIR} +fi + echo "Enter any configure script options." read CONFIG_OPTIONS @@ -49,9 +59,9 @@ 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} +PACKAGE_DIR=`dirname $0`/../${CATEGORY_DIR}/${PACKAGE_NAME} -mkdir ${PACKAGE_DIR} +mkdir -p ${PACKAGE_DIR} sed -e 's/ *$//g' > ${PACKAGE_DIR}/${PACKAGE_NAME}.mk < ${PACKAGE_DIR}/Config.in <