From: j8takagi Date: Sun, 21 Jul 2013 16:31:03 +0000 (+0900) Subject: 全般を修正 X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28ad0e52a815546012aad7b418e3b6a3f246540e;hp=c265fc5891c549363a7101e70083caf0d3da48ba;p=logcat.git 全般を修正 --- diff --git a/Makefile b/Makefile index f72d59e..b3271e7 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,16 @@ -.PHONY: build install +TARGETS := logcat dpkg-history + +.PHONY: all install PREFIX = /usr/local INSTALLDIR = $(PREFIX)/bin -ECHO = echo INSTALL = install -build: - @$(ECHO) "nothing is needed to build." -install: logcat dpkg-history - $(INSTALL) -m 755 logcat $(INSTALLDIR) - $(INSTALL) -m 755 dpkg-history $(INSTALLDIR) +all: $(TARGET) + +install: $(TARGETS) + for f in $(TARGETS); do $(INSTALL) -m 755 $$f $(INSTALLDIR); done -clean: - @$(ECHO) "nothing is needed to clean." +distclean: + $(RM) $(TARGETS) diff --git a/dpkg-history b/dpkg-history.sh old mode 100755 new mode 100644 similarity index 100% rename from dpkg-history rename to dpkg-history.sh diff --git a/logcat b/logcat.sh old mode 100755 new mode 100644 similarity index 66% rename from logcat rename to logcat.sh index e9e5ed6..6668f23 --- a/logcat +++ b/logcat.sh @@ -2,4 +2,4 @@ # logcat # 指定したログを、logrotateした分も含めてすべて出力 # -gunzip $1.[0-9]* | cat - $1.[0-9]* $1 | sort +gunzip -c $1.[0-9]* | cat - $1.[0-9]* $1 | sort