From: Jonas Fonseca <fonseca@diku.dk>
To: Petr Baudis <pasky@ucw.cz>
Cc: git@vger.kernel.org
Subject: [PATCH] Fix cg-version -h by sourcing cg-Xlib
Date: Tue, 15 Nov 2005 13:03:12 +0100 [thread overview]
Message-ID: <20051115120312.GA13925@diku.dk> (raw)
Also requires cg-version to become a bash script.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---
diff --git a/Makefile b/Makefile
index 72d7d12..b18e79f 100644
--- a/Makefile
+++ b/Makefile
@@ -42,7 +42,7 @@ endif
cg-version: $(VERSION) $(GIT_HEAD) Makefile
@echo Generating cg-version...
@rm -f $@
- @echo "#!/bin/sh" > $@
+ @echo "#!/usr/bin/env bash" >> $@
@echo "#" >> $@
@echo "# Show the version of the Cogito toolkit." >> $@
@echo "# Copyright (c) Petr Baudis, 2005" >> $@
@@ -53,6 +53,9 @@ cg-version: $(VERSION) $(GIT_HEAD) Makef
@echo "# at the build time." >> $@
@echo >> $@
@echo "USAGE=\"cg-version\"" >> $@
+ @echo "_git_repo_unneeded=1" >> $@
+ @echo >> $@
+ @echo ". \$${COGITO_LIB}cg-Xlib || exit 1" >> $@
@echo >> $@
@echo "echo \"$(shell cat $(VERSION))$(GIT_HEAD_ID)\"" >> $@
@chmod +x $@
@@ -92,7 +95,7 @@ install-cogito: $(SCRIPT) $(LIB_SCRIPT)
$(INSTALL) -m755 -d $(DESTDIR)$(libdir)
$(INSTALL) $(LIB_SCRIPT) $(DESTDIR)$(libdir)
cd $(DESTDIR)$(bindir); \
- for file in $(SCRIPT); do \
+ for file in $(SCRIPT) $(GEN_SCRIPT); do \
sed -e 's/\$${COGITO_LIB}/"\$${COGITO_LIB:-$(sedlibdir)\/}"/g' $$file > $$file.new; \
cat $$file.new > $$file; rm $$file.new; \
done
--
Jonas Fonseca
reply other threads:[~2005-11-15 12:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051115120312.GA13925@diku.dk \
--to=fonseca@diku.dk \
--cc=git@vger.kernel.org \
--cc=pasky@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).