From f8bffee4340525f3a52cda1cea75e367e3fc3743 Mon Sep 17 00:00:00 2001 From: Akihiro MOTOKI Date: Mon, 25 Mar 2013 20:14:14 +0900 Subject: [PATCH] (split) LDP: Ensure xargs in Makefile is called only if targets exist Previously xargs is always called, so xargs failed when the passed list if empty. --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3b3a65bc..5b022237 100644 --- a/Makefile +++ b/Makefile @@ -26,10 +26,14 @@ release: jm-setup rm -f $(PERKAMON_DIR)/build/ja ln -s ../../draft $(PERKAMON_DIR)/build/ja # Do not remove unreleased pages - git status release | grep 'deleted:' | awk '{print $3;}' | xargs -n1 git checkout + set -e; if git status release | grep deleted; then \ + git status release | grep 'deleted:' | awk '{print $3;}' | xargs -n1 git checkout; \ + fi release-tl: - git status release | grep modified | awk '{print $3;}' | cut -d / -f 3 | xargs -n1 -IXXXXX ../../admin/JM-tl-modify.pl -U translation_list XXXXX RO + set -e; if git status release | grep modified; then \ + git status release | grep modified | awk '{print $3;}' | cut -d / -f 3 | xargs -n1 -IXXXXX ../../admin/JM-tl-modify.pl -U translation_list XXXXX RO; \ + fi format: set -e; for d in po4a/*; do \ -- 2.11.0