From 988e447714f2192510ee60392e263944fe98405d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20Bartoszkiewicz?= Date: Tue, 22 Jan 2013 18:09:30 +0100 Subject: [PATCH 1/1] Pierwsza wersja. --- .gitignore | 2 ++ 42-embe-choinka.sh.in | 5 +++++ 50-embe-fortune.sh.in | 2 ++ 99-embe-newline.sh.in | 1 + Makefile | 10 ++++++++++ prefix.sh | 2 ++ 6 files changed, 22 insertions(+) create mode 100644 .gitignore create mode 100644 42-embe-choinka.sh.in create mode 100644 50-embe-fortune.sh.in create mode 100644 99-embe-newline.sh.in create mode 100644 Makefile create mode 100644 prefix.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..de5d7b2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.sh +!prefix.sh diff --git a/42-embe-choinka.sh.in b/42-embe-choinka.sh.in new file mode 100644 index 0000000..6f24e64 --- /dev/null +++ b/42-embe-choinka.sh.in @@ -0,0 +1,5 @@ +type choinka &> /dev/null || return +[ "$(date +%m)" -eq 12 ] || return + +echo +choinka diff --git a/50-embe-fortune.sh.in b/50-embe-fortune.sh.in new file mode 100644 index 0000000..fec65a0 --- /dev/null +++ b/50-embe-fortune.sh.in @@ -0,0 +1,2 @@ +echo +fortune -a diff --git a/99-embe-newline.sh.in b/99-embe-newline.sh.in new file mode 100644 index 0000000..fa11a6a --- /dev/null +++ b/99-embe-newline.sh.in @@ -0,0 +1 @@ +echo diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..fe071a5 --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ +IN_FILES := $(wildcard *.sh.in) +FILES := $(IN_FILES:.in=) + +.PHONY: all +all: $(FILES) + +$(FILES): %.sh: %.sh.in prefix.sh + cat prefix.sh > $@ + echo >> $@ + cat $< >> $@ diff --git a/prefix.sh b/prefix.sh new file mode 100644 index 0000000..d439cc9 --- /dev/null +++ b/prefix.sh @@ -0,0 +1,2 @@ +shopt -q login_shell || return +[[ "$-" == *i* ]] || return -- 2.45.2