summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xssn.at>2010-10-30 12:05:04 +0200
committerFlorian Pritz <bluewind@xssn.at>2010-10-30 12:05:04 +0200
commit0af6897a192dcd1b7458f7978005a286e4a37923 (patch)
tree56cc2e4db5e9a95f7c7c217630ef5cbac2f1b3fc
parent963ee5c74b33ebef7176d76e767cd9ab1578d3e3 (diff)
parentf7d95139d88c20e6dc4f29df0a0189f22526066d (diff)
Merge branch 'release_changes'
-rw-r--r--.gitignore1
-rw-r--r--Makefile14
-rw-r--r--[-rwxr-xr-x]fb.in (renamed from fb)7
3 files changed, 12 insertions, 10 deletions
diff --git a/.gitignore b/.gitignore
index c2566cc..13615f8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
dist
fb.1
+fb
diff --git a/Makefile b/Makefile
index 03bf66d..7252bc2 100644
--- a/Makefile
+++ b/Makefile
@@ -2,13 +2,18 @@ VERSION:=$(shell git describe | sed 's/^v//')
MANDIR=/usr/share/man
BINDIR=/usr/bin
-all: fb.1
+all: fb.1 fb
+
+fb: fb.in
+ @[ -n "$(VERSION)" ] || (echo "Error: version detection failed"; exit 1)
+ sed 's/@VERSION@/$(VERSION)/' fb.in > fb
+ chmod 755 fb
fb.1: fb.pod
pod2man -c "" fb.pod fb.1
clean:
- rm -f fb.1
+ rm -f fb.1 fb
rm -rf dist
install: all
@@ -20,9 +25,10 @@ uninstall:
rm -f $(DESTDIR)$(MANDIR)/man1/fb.1
dist: all
+ @[ -n "$(VERSION)" ] || (echo "Error: version detection failed"; exit 1)
mkdir -p dist/fb-$(VERSION)
- cp -a fb fb.pod fb.1 COPYING Makefile dist/fb-$(VERSION)
- sed -i 's/^VERSION=.*$$/VERSION="'$(VERSION)'"/' dist/fb-$(VERSION)/fb
+ cp -a fb fb.in fb.pod fb.1 COPYING Makefile dist/fb-$(VERSION)
+ sed -i 's/^VERSION:=.*$$/VERSION:="'$(VERSION)'"/' dist/fb-$(VERSION)/Makefile
cd dist; tar -czf fb-$(VERSION).tar.gz fb-$(VERSION)
version:
diff --git a/fb b/fb.in
index 759eb64..afd3211 100755..100644
--- a/fb
+++ b/fb.in
@@ -11,12 +11,7 @@
# Optional: xclip
#----------------------------------------------------
-SCRIPTDIR="`dirname "$0"`"
-VERSION="`cd $SCRIPTDIR; git describe 2>/dev/null | sed 's/^v//'`"
-
-if [ -z "$VERSION" ]; then
- VERSION="unknown"
-fi
+VERSION="@VERSION@"
DELETE=
EXTENSION=""