Commit b93272d3 authored by Alexandre Lision's avatar Alexandre Lision Committed by Romain B

cqfd: add -d behaviour

This directory is used to deduce the Dockerfile position
For our usecase it needs to be used conjointly with the -f option since
the dockerfile will be in the client submodule and our cqfdrc file will
be in this repo

Change-Id: Id94a979ba53f6d7132e7d175eee3bb83f1602029
Reviewed-by: default avatarRomain Bertozzi <romain.bertozzi@savoirfairelinux.com>
parent 24c23452
......@@ -20,7 +20,8 @@
set -e
PROGNAME=`basename $0`
dockerfile=".cqfd/docker/Dockerfile"
cqfd_dir=".cqfd"
dockerfile="$cqfd_dir/docker/Dockerfile"
cqfdrc=".cqfdrc"
## usage() - print usage on stdout
......@@ -30,6 +31,7 @@ Usage: $PROGNAME [OPTION ARGUMENT] [COMMAND] [ARGUMENTS]
Options:
-f <file> Use file as config file (default .cqfdrc)
-d <dir> Use directory as cqfd directory (default .cqfd)
-b <flavor_name> Target a specific build flavor.
Commands:
......@@ -231,7 +233,7 @@ config_load() {
build_cmd="$command"
if [ -n "$distro" ]; then
dockerfile=".cqfd/$distro/Dockerfile"
dockerfile="$cqfd_dir/$distro/Dockerfile"
fi
release_files="`eval echo $files`"
......@@ -263,6 +265,11 @@ while [ $# -gt 0 ]; do
shift
cqfdrc="$1"
;;
-d)
shift
cqfd_dir="$1"
dockerfile="$cqfd_dir/docker/Dockerfile"
;;
run|release)
[ "$1" = "release" ] && make_archive=1
if [ $# -gt 1 ]; then
......
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