DEB build scripts: added ability to build local modules even when they

are not yet part of the TDE umbrella.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/85/head
Michele Calgaro 4 years ago
parent 0c4db8b6da
commit 8bb36a4b48
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -78,27 +78,37 @@ function search_module()
MOD_GIT_PKGING_PATH="$REPO_TDE_PACKAGING/$MOD_NAME/debian" MOD_GIT_PKGING_PATH="$REPO_TDE_PACKAGING/$MOD_NAME/debian"
MOD_BUILD_PATH="$TDE_BUILD_DIR/$MOD_NAME" MOD_BUILD_PATH="$TDE_BUILD_DIR/$MOD_NAME"
else else
# Search in extra dependency folder # Search for a unique folder with the same name
LOC_BASENAME=`echo "$LOC_MOD_NAME" | sed -r "s|^${CFG_EXTRA_DEPS_DIR}/(debian/)?||"` if [ -d "${REPO_TDE_MAIN}/$LOC_MOD_NAME" ]; then
LOC_MATCH=`ls "$REPO_EXTRA_DEPENDENCIES/debian" | grep "^$LOC_BASENAME\$"` # Folder found
if [ "$LOC_MATCH" != "" -a "`echo $LOC_MATCH | wc -l`" = "1" ]; then
# Unique module found
MODULE_FOUND="y" MODULE_FOUND="y"
bool_EXTRADEP_MOD="y" MOD_NAME=$LOC_MOD_NAME
MOD_NAME="$CFG_EXTRA_DEPS_DIR/$LOC_MATCH" MOD_GIT_PATH="$REPO_TDE_MAIN/$MOD_NAME"
MOD_GIT_PATH="$REPO_EXTRA_DEPENDENCIES/debian/$LOC_BASENAME" MOD_GIT_PKGING_PATH="$REPO_TDE_PACKAGING/$MOD_NAME/debian"
MOD_BUILD_PATH="$TDE_BUILD_DIR/$CFG_EXTRA_DEPS_DIR/$LOC_BASENAME" MOD_BUILD_PATH="$TDE_BUILD_DIR/$MOD_NAME"
else else
# Search in metapackages folder # Search in extra dependency folder
LOC_BASENAME=`echo "$LOC_MOD_NAME" | sed -r "s|^(metapackages/)?||"` LOC_BASENAME=`echo "$LOC_MOD_NAME" | sed -r "s|^${CFG_EXTRA_DEPS_DIR}/(debian/)?||"`
LOC_MATCH=`ls "$REPO_TDE_MAIN/metapackages" | grep "^$LOC_BASENAME\$"` LOC_MATCH=`ls "$REPO_EXTRA_DEPENDENCIES/debian" | grep "^$LOC_BASENAME\$"`
if [ "$LOC_MATCH" != "" -a "`echo $LOC_MATCH | wc -l`" = "1" ]; then if [ "$LOC_MATCH" != "" -a "`echo $LOC_MATCH | wc -l`" = "1" ]; then
# Unique module found # Unique module found
MODULE_FOUND="y" MODULE_FOUND="y"
MOD_NAME="metapackages/$LOC_MATCH" bool_EXTRADEP_MOD="y"
MOD_GIT_PATH="$REPO_TDE_MAIN/metapackages/$LOC_BASENAME" MOD_NAME="$CFG_EXTRA_DEPS_DIR/$LOC_MATCH"
MOD_GIT_PKGING_PATH="$REPO_TDE_PACKAGING/$MOD_NAME/debian" MOD_GIT_PATH="$REPO_EXTRA_DEPENDENCIES/debian/$LOC_BASENAME"
MOD_BUILD_PATH="$TDE_BUILD_DIR/metapackages/$LOC_BASENAME" MOD_BUILD_PATH="$TDE_BUILD_DIR/$CFG_EXTRA_DEPS_DIR/$LOC_BASENAME"
else
# Search in metapackages folder
LOC_BASENAME=`echo "$LOC_MOD_NAME" | sed -r "s|^(metapackages/)?||"`
LOC_MATCH=`ls "$REPO_TDE_MAIN/metapackages" | grep "^$LOC_BASENAME\$"`
if [ "$LOC_MATCH" != "" -a "`echo $LOC_MATCH | wc -l`" = "1" ]; then
# Unique module found
MODULE_FOUND="y"
MOD_NAME="metapackages/$LOC_MATCH"
MOD_GIT_PATH="$REPO_TDE_MAIN/metapackages/$LOC_BASENAME"
MOD_GIT_PKGING_PATH="$REPO_TDE_PACKAGING/$MOD_NAME/debian"
MOD_BUILD_PATH="$TDE_BUILD_DIR/metapackages/$LOC_BASENAME"
fi
fi fi
fi fi
fi fi

Loading…
Cancel
Save