Commit 9e1489d5 authored by cpomies's avatar cpomies
Browse files

Fixed some bug on checkout script

parent 9611f5a6
......@@ -39,8 +39,6 @@ if [ "${no_checkout}" != "true" ] ; then
"$(get_remote_directory "$flavour" "$slot" "$slot_build_id")"
fi
fi
check_preconditions \
"${config_file_checkout}" \
"${slot}" \
......
......@@ -23,98 +23,98 @@ checkout_slot flavour slot slot_build_id
[--peojects-list <projects>]
[--no-checkout]"
local nb_param=0
local config_dir="."
local dest_dir="."
local no_checkout=false ;;
while (( "$#" )); do
if [[ "$1" =~ ^- ]] ; then
case "$1" in
"--config-dir")
if [[ "$2" = "" || "$2" =~ ^- ]] ; then
echo "ERROR : Option $1 need an argument"
exit 3
else
local config_dir="$2"
fi
shift ;;
"--dest-dir")
if [[ "$2" = "" || "$2" =~ ^- ]] ; then
echo "ERROR : Option $1 need an argument"
exit 3
else
local dest_dir="$2"
fi
shift ;;
"--build-tool")
if [[ "$2" = "" || "$2" =~ ^- ]] ; then
echo "ERROR : Option $1 need an argument"
exit 3
else
local build_tool="$2"
fi
shift ;;
"--platforms")
if [[ "$2" = "" || "$2" =~ ^- ]] ; then
echo "ERROR : Option $1 need an argument"
exit 3
else
local platforms="$2"
fi
shift ;;
"--packages-list")
if [[ "$2" = "" || "$2" =~ ^- ]] ; then
echo "ERROR : Option $1 need an argument"
exit 3
else
local packages_list="$2"
fi
shift ;;
"--projects-list")
if [[ "$2" = "" || "$2" =~ ^- ]] ; then
echo "ERROR : Option $1 need an argument"
exit 3
else
local projects_list="$2"
fi
shift ;;
"--no-checkout")
local no_checkout=true ;;
"-h" | "--help")
echo ${DESCRIPTION}
echo ${USAGE}
exit 0;;
*)
echo "ERROR : Option $1 unknow in $0"
echo ${USAGE}
exit 2
esac
else
case "${nb_param}" in
"0")
local flavour="$1" ;;
"1")
local slot="$1" ;;
"2")
local slot_build_id="$1" ;;
*)
echo "ERROR : Too much parameter"
echo ${USAGE}
exit 1
esac
local nb_param=$((nb_param+1))
fi
local nb_param=0
local config_dir="."
local dest_dir="."
local no_checkout=false
while (( "$#" )); do
if [[ "$1" =~ ^- ]] ; then
case "$1" in
"--config-dir")
if [[ "$2" = "" || "$2" =~ ^- ]] ; then
echo "ERROR : Option $1 need an argument"
exit 3
else
local config_dir="$2"
fi
shift ;;
"--dest-dir")
if [[ "$2" = "" || "$2" =~ ^- ]] ; then
echo "ERROR : Option $1 need an argument"
exit 3
else
local dest_dir="$2"
fi
shift ;;
"--build-tool")
if [[ "$2" = "" || "$2" =~ ^- ]] ; then
echo "ERROR : Option $1 need an argument"
exit 3
else
local build_tool="$2"
fi
shift ;;
"--platforms")
if [[ "$2" = "" || "$2" =~ ^- ]] ; then
echo "ERROR : Option $1 need an argument"
exit 3
else
local platforms="$2"
fi
shift ;;
"--packages-list")
if [[ "$2" = "" || "$2" =~ ^- ]] ; then
echo "ERROR : Option $1 need an argument"
exit 3
else
local packages_list="$2"
fi
shift ;;
"--projects-list")
if [[ "$2" = "" || "$2" =~ ^- ]] ; then
echo "ERROR : Option $1 need an argument"
exit 3
else
local projects_list="$2"
fi
shift ;;
"--no-checkout")
local no_checkout=true ;;
"-h" | "--help")
echo ${DESCRIPTION}
echo ${USAGE}
exit 0;;
*)
echo "ERROR : Option $1 unknow in $0"
echo ${USAGE}
exit 2
esac
else
case "${nb_param}" in
"0")
local flavour="$1" ;;
"1")
local slot="$1" ;;
"2")
local slot_build_id="$1" ;;
*)
echo "ERROR : Too much parameter"
echo ${USAGE}
exit 1
esac
local nb_param=$((nb_param+1))
fi
shift
done
shift
done
if [ "${no_checkout}" != "true" ]; then
if [ "${nb_param}" != "3" ] ; then
......
File mode changed from 100644 to 100755
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