Commit e84b0820 authored by Alessandro Elias's avatar Alessandro Elias

Merge branch 'issue/555' into 'develop'

SCRUM#555: Make preconfiguration file to store and initialize variables that can be changed by parameters

See merge request !12
parents e6641bcc aa7de148
_HELP=false
_DIST=""
_ARCH="amd64"
_REPO="stable"
......@@ -20,10 +20,9 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
_HELP=false
_DIST="nodistro"
_ARCH="amd64"
_REPO="stable"
export PREFIX=$(pwd)
source ${PREFIX}/conf/pre.conf \
|| log ERROR "Preconfiguration file not found"
while true; do
case "$1" in
......@@ -37,7 +36,7 @@ while true; do
done
if [ ${_HELP} = true ]; then
echo "Usage: sudo $0 [OPTION] [ARGUMENT]..."
echo "Usage: $0 [OPTION] [ARGUMENT]..."
echo ""
echo "Examples:"
echo " sudo $0 --distro le6/testing # Generate default arch (amd64) le6 iso image"
......@@ -51,8 +50,8 @@ if [ ${_HELP} = true ]; then
exit 2
fi
if [ ${_DIST} = "nodistro" ]; then
echo "No distro. Try with --help."
if [ -z ${_DIST} ]; then
echo "No distro specified. Try with --help."
exit 1
fi
......@@ -71,10 +70,8 @@ if [ "$(id -u)" != "0" ]; then
exit -1
fi
export PREFIX=$(pwd)
source ${PREFIX}/conf/$_DIST/create-iso.conf \
|| log ERROR "configuration file not found for dist: \"${_DIST}\""
|| log ERROR "Configuration file not found for dist: \"${_DIST}\""
source common.sh
source lib/mktmpfs.sh
......
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