From 39c79722b939f735735c41b884fee3a33cee93e2 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Thu, 23 Apr 2020 12:12:52 +0900 Subject: DEB build scripts: update distro lists. Signed-off-by: Michele Calgaro --- .../_buildscripts/local/internals/_build_common.sh | 14 ++--- .../_buildscripts/local/internals/distro_list.txt | 59 +++++++++++----------- 2 files changed, 37 insertions(+), 36 deletions(-) (limited to 'debian/_buildscripts/local/internals') 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 diff --git a/debian/_buildscripts/local/internals/distro_list.txt b/debian/_buildscripts/local/internals/distro_list.txt index d1961791e..3490402b0 100644 --- a/debian/_buildscripts/local/internals/distro_list.txt +++ b/debian/_buildscripts/local/internals/distro_list.txt @@ -1,5 +1,4 @@ -#!/bin/bash - +# # List of supported distributions # # Format: @@ -9,30 +8,32 @@ # package suffix if required # tde/packaging corresponding path if required # -DISTROS=" - # -- debian -- - debian 7.0 wheezy '' '' - debian 8.0 jessie '' '' - debian 9.0 stretch '' '' - debian 10.0 buster '' '' - debian 11.0 bullseye ~a '' - debian 12.0 sid ~b '' - # -- devuan -- - devuan 1.0 jessie '' debian/jessie - devuan 2.0 ascii '' debian/stretch - devuan 3.0 beowulf ~a debian/buster - devuan 4.0 ceres ~b debian/sid - # -- raspbian -- - raspbian 8.0 raspbian-jessie '' '' - raspbian 9.0 raspbian-stretch '' '' - raspbian 10.0 raspbian-buster ~a '' - # -- ubuntu -- - ubuntu 12.04 precise '' '' - ubuntu 14.04 trusty '' '' - ubuntu 16.04 xenial '' '' - ubuntu 17.10 artful '' '' - ubuntu 18.04 bionic '' '' - ubuntu 18.10 cosmic '' '' - ubuntu 19.04 disco '' '' - ubuntu 19.10 eoan ~a '' -" + +# debian +debian 7.0 wheezy - - +debian 8.0 jessie - - +debian 9.0 stretch - - +debian 10.0 buster - - +debian 11.0 bullseye ~a - +debian 12.0 sid ~b - + +# devuan +devuan 1.0 jessie - debian/jessie +devuan 2.0 ascii - debian/stretch +devuan 3.0 beowulf ~a debian/buster +devuan 4.0 ceres ~b debian/sid + +# raspbian +raspbian 8.0 raspbian-jessie - - +raspbian 9.0 raspbian-stretch - - +raspbian 10.0 raspbian-buster - - +raspbian 11.0 raspbian-bullseye ~a - + +# ubuntu +ubuntu 14.04 trusty - - +ubuntu 16.04 xenial - - +ubuntu 18.04 bionic - - +ubuntu 18.10 cosmic - - +ubuntu 19.04 disco - - +ubuntu 19.10 eoan - - +ubuntu 20.04 focal - - -- cgit v1.2.1