[PATCH v2 4/5] Make sure to use Araxis' compare and not e.g. ImageMagick's
Signed-off-by: Sebastian Schuberth sschube...@gmail.com --- mergetools/araxis | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mergetools/araxis b/mergetools/araxis index 64f97c5..aeba1b9 100644 --- a/mergetools/araxis +++ b/mergetools/araxis @@ -16,5 +16,11 @@ merge_cmd () { } translate_merge_tool_path() { - echo compare + # Make sure to use Araxis' compare and not e.g. ImageMagick's. + if ls $(dirname $(which compare))/Araxis* /dev/null 21 + then + echo compare + else + echo $1 + fi } -- 1.7.11.msysgit.2 -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 4/5] Make sure to use Araxis' compare and not e.g. ImageMagick's
Sebastian Schuberth sschube...@gmail.com writes: Signed-off-by: Sebastian Schuberth sschube...@gmail.com --- mergetools/araxis | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mergetools/araxis b/mergetools/araxis index 64f97c5..aeba1b9 100644 --- a/mergetools/araxis +++ b/mergetools/araxis @@ -16,5 +16,11 @@ merge_cmd () { } translate_merge_tool_path() { - echo compare + # Make sure to use Araxis' compare and not e.g. ImageMagick's. + if ls $(dirname $(which compare))/Araxis* /dev/null 21 Use of which in scripts that are meant to be portable is a no-no. Some platforms would say compare is /usr/local/bin/compare instead of saying /usr/local/bin/compare. + then + echo compare + else + echo $1 + fi } -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html