Commit e4d31a42 authored by Ophélie Gagnard's avatar Ophélie Gagnard

build-scripts/configure_information.sh: Improve space handling in the variables name.

parent 87b38114
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
INITIAL_DIR="$(pwd)"/ INITIAL_DIR="$(pwd)"/
# DEBIAN_REVISION INFORMATION ### DEBIAN_REVISION INFORMATION ###
# Modify the following variables accordingly # Modify the following variables accordingly
SOFTWARE_VERSION=1 SOFTWARE_VERSION=1
#RECIPE_VERSION=1 #RECIPE_VERSION=1
...@@ -19,44 +19,44 @@ COMPOUND_VERSION=${SOFTWARE_VERSION}-${DEBIAN_REVISION} ...@@ -19,44 +19,44 @@ COMPOUND_VERSION=${SOFTWARE_VERSION}-${DEBIAN_REVISION}
SOFTWARE_AND_VERSION=${SOFTWARE_NAME}_${COMPOUND_VERSION} SOFTWARE_AND_VERSION=${SOFTWARE_NAME}_${COMPOUND_VERSION}
ARCHIVE_EXT=.tar.gz ARCHIVE_EXT=.tar.gz
# INSTALL INFORMATION ### INSTALL INFORMATION ###
# TARGET_DIR is only used in the templates via sed regexps # TARGET_DIR is only used in the templates via sed regexps
TARGET_DIR=/opt/$SOFTWARE_AND_VERSION TARGET_DIR=/opt/$SOFTWARE_AND_VERSION
# OBS AND DISTRIBUTIONS INFORMATION ### OBS AND DISTRIBUTIONS INFORMATION ###
# get the user from osc configuration file # get the user from osc configuration file
OBS_USER=$(cat ~/.config/osc/oscrc | grep user= | cut -d'=' -f2) OBS_USER="$(cat ~/.config/osc/oscrc | grep user= | cut -d'=' -f2)"
OBS_PROJECT=home:$OBS_USER OBS_PROJECT="home:$OBS_USER"
OBS_DIR=$INITIAL_DIR/$OBS_PROJECT/$SOFTWARE_NAME/ OBS_DIR="$INITIAL_DIR/$OBS_PROJECT/$SOFTWARE_NAME/"
DIST_DIR=$INITIAL_DIR/distribution-specifics/$SOFTWARE_NAME/ DIST_DIR="$INITIAL_DIR/distribution-specifics/$SOFTWARE_NAME/"
TARBALL_DIR=$INITIAL_DIR/tarballs/$SOFTWARE_AND_VERSION TARBALL_DIR="$INITIAL_DIR/tarballs/$SOFTWARE_AND_VERSION"
# BUILD INFORMATION ### BUILD INFORMATION ###
# Modify the following variables accordingly # Modify the following variables accordingly
#SR_PATH=$TARBALL_DIR/software_release/component/$SOFTWARE_NAME/buildout.cfg #SR_PATH=$TARBALL_DIR/software_release/component/$SOFTWARE_NAME/buildout.cfg
SR_PATH=$TARBALL_DIR/software_release/software/$SOFTWARE_NAME/software.cfg SR_PATH="$TARBALL_DIR/software_release/software/$SOFTWARE_NAME/software.cfg"
COMPILATION_TEMPLATES_DIR=$INITIAL_DIR/templates/compilation-templates/ COMPILATION_TEMPLATES_DIR="$INITIAL_DIR/templates/compilation-templates/"
# BUILD_DIR was formerly BUILD_ROOT_DIRECTORY # BUILD_DIR was formerly BUILD_ROOT_DIRECTORY
BUILD_DIR=$TARBALL_DIR/build/ BUILD_DIR="$TARBALL_DIR/build/"
# RUN_BUILDOUT_DIR is where the parts/ directory will be ; formerly BUILD_DIRECTORY # RUN_BUILDOUT_DIR is where the parts/ directory will be ; formerly BUILD_DIRECTORY
RUN_BUILDOUT_DIR=$BUILD_DIR/$TARGET_DIR RUN_BUILDOUT_DIR="$BUILD_DIR/$TARGET_DIR"
DISTRIB_TEMPLATES_DIR=$INITIAL_DIR/templates/distribution-templates DISTRIB_TEMPLATES_DIR="$INITIAL_DIR/templates/distribution-templates"
DISTRIB_FILES_DIR=$INITIAL_DIR/distribution-specifics/$SOFTWARE_NAME DISTRIB_FILES_DIR="$INITIAL_DIR/distribution-specifics/$SOFTWARE_NAME"
# Path normalization ## Path normalization
INITIAL_DIR=`realpath -m $INITIAL_DIR` INITIAL_DIR="$(realpath -m $INITIAL_DIR)"
TARGET_DIR=`realpath -m $TARGET_DIR` TARGET_DIR="$(realpath -m $TARGET_DIR)"
OBS_DIR=`realpath -m $OBS_DIR` OBS_DIR="$(realpath -m $OBS_DIR)"
DIST_DIR=`realpath -m $DIST_DIR` DIST_DIR="$(realpath -m $DIST_DIR)"
TARBALL_DIR=`realpath -m $TARBALL_DIR` TARBALL_DIR="$(realpath -m $TARBALL_DIR)"
SR_PATH=`realpath -m $SR_PATH` SR_PATH="$(realpath -m $SR_PATH)"
COMPILATION_TEMPLATES_DIR=`realpath -m $COMPILATION_TEMPLATES_DIR` COMPILATION_TEMPLATES_DIR="$(realpath -m $COMPILATION_TEMPLATES_DIR)"
BUILD_DIR=`realpath -m $BUILD_DIR` BUILD_DIR="$(realpath -m $BUILD_DIR)"
RUN_BUILDOUT_DIR=`realpath -m $RUN_BUILDOUT_DIR` RUN_BUILDOUT_DIR="$(realpath -m $RUN_BUILDOUT_DIR)"
DISTRIB_TEMPLATES_DIR=`realpath -m $DISTRIB_TEMPLATES_DIR` DISTRIB_TEMPLATES_DIR="$(realpath -m $DISTRIB_TEMPLATES_DIR)"
DISTRIB_FILES_DIR=`realpath -m $DISTRIB_FILES_DIR` DISTRIB_FILES_DIR="$(realpath -m $DISTRIB_FILES_DIR)"
## Regular expressions for templates ## Regular expressions for templates
NAME_REGEX="s|%SOFTWARE_NAME%|$SOFTWARE_NAME|g;s|%SOFTWARE_AND_VERSION%|$SOFTWARE_AND_VERSION|g" NAME_REGEX="s|%SOFTWARE_NAME%|$SOFTWARE_NAME|g;s|%SOFTWARE_AND_VERSION%|$SOFTWARE_AND_VERSION|g"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment