Commit ff7ef428 authored by Julius Athenstaedt's avatar Julius Athenstaedt Committed by sevenuz
Browse files

unify profile mode and dependency into -p option for scripts/compile_dep.sh

parent d1b5b5aa
Loading
Loading
Loading
Loading
+2 −22
Original line number Diff line number Diff line
@@ -373,26 +373,6 @@ while [[ $# -gt 0 ]]; do
    case ${key} in
    -p | --profile)

        [ -n "${EXECUTION_MODE}" ] && exec_mode_error || EXECUTION_MODE='profile'

        if [[ -z "$2" ]]; then
            echo "ERROR: Missing argument for -p/--profile option"
            exit 1
        fi

        if [[ "$2" =~ ^(.*):(.*)$ ]]; then
            PROFILE_NAME="${BASH_REMATCH[1]}"
            PROFILE_VERSION="${BASH_REMATCH[2]}"
        else
            PROFILE_NAME="$2"
            PROFILE_VERSION="${DEFAULT_VERSION}"
        fi

        shift # past argument
        shift # past value
        ;;
    -d | --dependency)

        [ -n "${EXECUTION_MODE}" ] && exec_mode_error || EXECUTION_MODE='dependency'

        if [[ -z "$2" ]]; then