diff --git a/src/Algorithms/AlgorithmCiftiSeparate.cxx b/src/Algorithms/AlgorithmCiftiSeparate.cxx index aba9b8fc2..3c7e0bcab 100644 --- a/src/Algorithms/AlgorithmCiftiSeparate.cxx +++ b/src/Algorithms/AlgorithmCiftiSeparate.cxx @@ -193,7 +193,7 @@ void AlgorithmCiftiSeparate::useParameters(OperationParameters* myParams, Progre } if (!outputRequested) { - CaretLogWarning("no output requested from -cifti-separate, operation will do nothing"); + CaretLogWarning("no output requested from -cifti-separate, command will do nothing"); } } diff --git a/src/CommandLine/wb_shortcuts b/src/CommandLine/wb_shortcuts index 5bc43483f..82bb8f516 100755 --- a/src/CommandLine/wb_shortcuts +++ b/src/CommandLine/wb_shortcuts @@ -25,10 +25,11 @@ set -ue global_cmd_line="$0 $*" global_script_name="wb_shortcuts" +global_script_version="beta-0.2" function version () { - echo "$global_script_name, version beta-0.2" + echo "$global_script_name, version $global_script_version" } function usage () @@ -50,7 +51,7 @@ function usage () } #the main function is so that we can put the main code before other function definitions -#simply gets called as 'main "$@"' after all functions are defined +#it simply gets called as 'main "$@"' after all functions are defined function main () { #NOTE: if we have a lot of functions, check_functions could cause a short startup delay, could make a debug setting to control it @@ -157,15 +158,29 @@ function cifti_concatenate () then echo "`switch_to_descrip $function_switch`" echo " $global_script_name $function_switch" + echo " [-map ] - use only the specified map from each input" + echo " file" echo " " echo " " echo " ..." echo #wrap guide for 80 columns | echo " Additional input files may be specified after the mandatory input file." + echo " The -map option takes either a 1-based index or a map name, and causes" + echo " the operation to use only one map from each input file." echo exit 0 fi + local -a maparg + if [[ "$1" == "-map" ]] + then + if (($# < 2)) + then + error "-map option requires an argument" + fi + maparg=("-column" "$2") + shift 2 + fi if (($# < 2)) then error "function requires 2 or more arguments" @@ -173,7 +188,7 @@ function cifti_concatenate () local -a merge_arg_array for ((i = 2; i <= $#; ++i)) do - merge_arg_array+=("-cifti" "${!i}") + merge_arg_array+=("-cifti" "${!i}" "${maparg[@]}") done wb_command -cifti-merge "$1" "${merge_arg_array[@]}" } @@ -362,15 +377,29 @@ function label_concatenate () then echo "`switch_to_descrip $function_switch`" echo " $global_script_name $function_switch" + echo " [-map ] - use only the specified map from each input" + echo " file" echo " " echo " " echo " ..." echo #wrap guide for 80 columns | echo " Additional input files may be specified after the mandatory input file." + echo " The -map option takes either a 1-based index or a map name, and causes" + echo " the operation to use only one map from each input file." echo exit 0 fi + local -a maparg + if [[ "$1" == "-map" ]] + then + if (($# < 2)) + then + error "-map option requires an argument" + fi + maparg=("-column" "$2") + shift 2 + fi if (($# < 2)) then error "function requires 2 or more arguments" @@ -378,7 +407,7 @@ function label_concatenate () local -a merge_arg_array for ((i = 2; i <= $#; ++i)) do - merge_arg_array+=("-label" "${!i}") + merge_arg_array+=("-label" "${!i}" "${maparg[@]}") done wb_command -label-merge "$1" "${merge_arg_array[@]}" } @@ -392,15 +421,29 @@ function metric_concatenate () then echo "`switch_to_descrip $function_switch`" echo " $global_script_name $function_switch" + echo " [-map ] - use only the specified map from each input" + echo " file" echo " " echo " " echo " ..." echo #wrap guide for 80 columns | echo " Additional input files may be specified after the mandatory input file." + echo " The -map option takes either a 1-based index or a map name, and causes" + echo " the operation to use only one map from each input file." echo exit 0 fi + local -a maparg + if [[ "$1" == "-map" ]] + then + if (($# < 2)) + then + error "-map option requires an argument" + fi + maparg=("-column" "$2") + shift 2 + fi if (($# < 2)) then error "function requires 2 or more arguments" @@ -408,7 +451,7 @@ function metric_concatenate () local -a merge_arg_array for ((i = 2; i <= $#; ++i)) do - merge_arg_array+=("-metric" "${!i}") + merge_arg_array+=("-metric" "${!i}" "${maparg[@]}") done wb_command -metric-merge "$1" "${merge_arg_array[@]}" } @@ -452,15 +495,29 @@ function volume_concatenate () then echo "`switch_to_descrip $function_switch`" echo " $global_script_name $function_switch" + echo " [-map ] - use only the specified map from each input" + echo " file" echo " " echo " " echo " ..." echo #wrap guide for 80 columns | echo " Additional input files may be specified after the mandatory input file." + echo " The -map option takes either a 1-based index or a map name, and causes" + echo " the operation to use only one map from each input file." echo exit 0 fi + local -a maparg + if [[ "$1" == "-map" ]] + then + if (($# < 2)) + then + error "-map option requires an argument" + fi + maparg=("-subvolume" "$2") + shift 2 + fi if (($# < 2)) then error "function requires 2 or more arguments" @@ -468,7 +525,7 @@ function volume_concatenate () local -a merge_arg_array for ((i = 2; i <= $#; ++i)) do - merge_arg_array+=("-volume" "${!i}") + merge_arg_array+=("-volume" "${!i}" "${maparg[@]}") done wb_command -volume-merge "$1" "${merge_arg_array[@]}" }