summaryrefslogtreecommitdiffstats
path: root/debian/_buildscripts/local/internals/_build_common.sh
diff options
context:
space:
mode:
Diffstat (limited to 'debian/_buildscripts/local/internals/_build_common.sh')
-rwxr-xr-xdebian/_buildscripts/local/internals/_build_common.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/debian/_buildscripts/local/internals/_build_common.sh b/debian/_buildscripts/local/internals/_build_common.sh
index 76c27e142..105134084 100755
--- a/debian/_buildscripts/local/internals/_build_common.sh
+++ b/debian/_buildscripts/local/internals/_build_common.sh
@@ -107,11 +107,11 @@ function init_common()
fi
# Make sure we have selected a supported distribution
- DISTS_FILE="$SCRIPT_DIR/internals/distro_list.txt"
- if [ ! -f "$DISTS_FILE" ]; then
+ DISTROS_FILE="$SCRIPT_DIR/internals/distro_list.txt"
+ if [ ! -f "$DISTROS_FILE" ]; then
echo -e "${CLightRed} --- ERROR ---${CNone}"
echo "Could not find the list of supported distributions."
- echo -e "Please check the file ${CLightPurple}$DISTS_FILE${CNone} exists, then rerun this script."
+ echo -e "Please check the file ${CLightPurple}$DISTROS_FILE${CNone} exists, then rerun this script."
exit 3
fi
# -- Need to use a "here string" otherwise if the DISTRO_FOUND value is modified
@@ -121,8 +121,8 @@ function init_common()
while read l_distro l_version l_name l_rel_suffix l_packaging_path; do
if [ "$l_distro" = "$DISTRO" -a "$l_name" = "$DISTRO_NAME" ]; then
DISTRO_FOUND="y"
- l_rel_suffix=`echo "$l_rel_suffix" | perl -pe "s|^[\"']?(.*?)[\"']?$|\1|g"`
- l_packaging_path=`echo "$l_packaging_path" | perl -pe "s|^[\"']?(.*?)[\"']?$|\1|g"`
+ l_rel_suffix=`echo "$l_rel_suffix" | perl -pe "s|^[\"-]?(.*?)[\"]?$|\1|g"`
+ l_packaging_path=`echo "$l_packaging_path" | perl -pe "s|^[\"-]?(.*?)[\"]?$|\1|g"`
export DISTRO_VERSION="$l_version"
export REL_SUFFIX="$l_rel_suffix"
if [[ ! -z "$l_packaging_path" ]]; then
@@ -130,13 +130,13 @@ function init_common()
fi
break
fi
- done <<< $(cat $DISTS_FILE | grep -E "^(\s*[^#\s]+\s+[^\s]+.*)$")
+ done <<< $(sed -n "s|\(^[\s]*[^#\s]\+.*$\)|\1|p" < $DISTROS_FILE)
IFS=$OLD_IFS
if [ "$DISTRO_FOUND" != "y" ]; then
echo -e "${CLightRed} --- ERROR ---${CNone}"
echo -e "The specified distribution (${CYellow}$DISTRO $DISTRO_NAME${CNone}) is not supported."
echo -e "Something is wrong with your configuration (${CLightPurple}$CFG_FILE${CNone})"
- echo -e "or with the list of supported distributions (${CLightPurple}$DISTS_FILE${CNone})."
+ echo -e "or with the list of supported distributions (${CLightPurple}$DISTROS_FILE${CNone})."
echo -e "Please check the ${CLightCyan}DISTRO${CNone} and ${CLightCyan}DISTRO_NAME${CNone} variables, then rerun this script."
exit 4
fi