From: Alexander Barton Date: Mon, 1 Sep 2014 21:54:38 +0000 (+0200) Subject: axify: Correctly install Makefile.ax if it doesn't exist X-Git-Url: https://arthur.barton.de/gitweb/?p=ax-make.git;a=commitdiff_plain;h=b75e1670b62cb56377f67f338680a659820df71b;hp=771ffaa599c11f47a6108f72d1d2a7b839e36bbb axify: Correctly install Makefile.ax if it doesn't exist --- diff --git a/scripts/axify b/scripts/axify index b40d918..ec3d593 100755 --- a/scripts/axify +++ b/scripts/axify @@ -26,11 +26,13 @@ fi # -- Makefile.ax -- [ ! -d "$LIB_D" ] && mkdir -pv "$LIB_D" -if [ "$MAKEFILE_AX" -nt "$LIB_D/`basename "$MAKEFILE_AX"`" ]; then - echo "Updating \"$LIB_D/`basename "$MAKEFILE_AX"`\" ..." - cp -v "$MAKEFILE_AX" "$LIB_D/`basename "$MAKEFILE_AX"`" || exit 1 + +target="$LIB_D/`basename "$MAKEFILE_AX"`" +if [ ! -e "$target" -o "$MAKEFILE_AX" -nt "$target" ]; then + echo "Updating \"$target\" ..." + cp -v "$MAKEFILE_AX" "$target" || exit 1 else - echo "Makefile \"$LIB_D/`basename "$MAKEFILE_AX"`\" is up to date." + echo "Makefile \"$target\" is up to date." fi # -- Project Makefile's ---