]> git.bzium.org/ - embe/embe-profile-files.git/commitdiff
Pierwsza wersja.
authorMichał Bartoszkiewicz <mbartoszkiewicz@gmail.com>
Tue, 22 Jan 2013 17:09:30 +0000 (18:09 +0100)
committerMichał Bartoszkiewicz <mbartoszkiewicz@gmail.com>
Tue, 22 Jan 2013 17:09:30 +0000 (18:09 +0100)
.gitignore [new file with mode: 0644]
42-embe-choinka.sh.in [new file with mode: 0644]
50-embe-fortune.sh.in [new file with mode: 0644]
99-embe-newline.sh.in [new file with mode: 0644]
Makefile [new file with mode: 0644]
prefix.sh [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..de5d7b2
--- /dev/null
@@ -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 (file)
index 0000000..6f24e64
--- /dev/null
@@ -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 (file)
index 0000000..fec65a0
--- /dev/null
@@ -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 (file)
index 0000000..fa11a6a
--- /dev/null
@@ -0,0 +1 @@
+echo
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
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 (file)
index 0000000..d439cc9
--- /dev/null
+++ b/prefix.sh
@@ -0,0 +1,2 @@
+shopt -q login_shell || return
+[[ "$-" == *i* ]] || return