Permalink
Browse files

add manual page. closes issue #10

  • Loading branch information...
1 parent 1f0c5a8 commit 21a763e308e8fa1226e9e9946f93e0823c471f50 @jceb committed Oct 4, 2012
Showing with 74 additions and 15 deletions.
  1. +21 −15 Makefile
  2. +53 −0 dex.1
View
@@ -1,26 +1,32 @@
NAME = dex
PREFIX = /usr/local
-INSTALLDIR = $(PREFIX)/bin
-DOCDIR = $(PREFIX)/share/doc/$(NAME)
-TAG = dex-$(shell git tag | tail -n 1)
+DOCPREFIX = $(PREFIX)/share/doc/$(NAME)
+MANPREFIX = $(PREFIX)/man
+VERSION = $(shell git tag | tail -n 1)
+TAG = dex-$(VERSION)
build:
-install: dex README LICENSE
- mkdir -p $(DESTDIR)$(INSTALLDIR)
- install -m 0755 $< $(DESTDIR)$(INSTALLDIR)/
-
- mkdir -p $(DESTDIR)$(DOCDIR)
- install -m 0644 -t $(DESTDIR)$(DOCDIR)/ README LICENSE
+install: dex dex.1 README LICENSE
+ @echo installing executable file to $(DESTDIR)$(PREFIX)/bin
+ @mkdir -p $(DESTDIR)$(PREFIX)/bin
+ @install -m 0755 $< $(DESTDIR)$(PREFIX)/bin/
+ @echo installing docs to $(DESTDIR)$(DOCPREFIX)
+ @mkdir -p $(DESTDIR)$(DOCPREFIX)
+ @install -m 0644 -t $(DESTDIR)$(DOCPREFIX)/ README LICENSE
+ @echo installing manual page to $(DESTDIR)$(MANPREFIX)/man1
+ @mkdir -p $(DESTDIR)$(MANPREFIX)/man1
+ @install -m 0644 -t $(DESTDIR)$(MANPREFIX)/man1 dex.1
+ @sed -i -e "s/VERSION/$(VERSION)/g" $(DESTDIR)$(MANPREFIX)/man1/dex.1
tgz: source
-source: dex README LICENSE Makefile
- mkdir $(TAG)
- cp -t $(TAG) $+
- tar czf $(TAG).tar.gz $(TAG)
- rm -rf $(TAG)
- @echo "Source package is ready: $(TAG).tar.gz"
+source: dex dex.1 README LICENSE Makefile
+ @echo "Creating source package: $(TAG).tar.gz"
+ @mkdir $(TAG)
+ @cp -t $(TAG) $+
+ @tar czf $(TAG).tar.gz $(TAG)
+ @rm -rf $(TAG)
clean:
@rm $(TAG).tar.gz
View
53 dex.1
@@ -0,0 +1,53 @@
+.TH DEX 1 dex\-VERSION
+.SH NAME
+dex \- DesktopEntry Execution
+.SH SYNOPSIS
+.B dex
+.RB [options]\ [DesktopEntryFile\ [DesktopEntryFile ...]]
+.SH DESCRIPTION
+dex, DesktopEntry Execution, is a program to generate and execute
+DesktopEntry files of the type Application.
+.SH OPTIONS
+.TP
+.B \-h, \-\-help
+show this help message and exit
+.TP
+.B \-a, \-\-autostart
+autostart programs
+.TP
+.B \-c CREATE [CREATE ...], \-\-create CREATE [CREATE ...]
+create a DesktopEntry file for the given program. If a second argument
+is provided it's taken as output filename or written to stdout (filname:
+\-). By default a new file with the postfix .desktop is created
+.TP
+.B \-d, \-\-dry\-run
+dry run, don't execute any command
+.TP
+.B \-e ENVIRONMENT, \-\-environment ENVIRONMENT
+specify the Desktop Environment an autostart should be performed for;
+works only in combination with \-\-autostart
+.TP
+.B \-t, \-\-test
+perform a self\-test
+.TP
+.B \-v, \-\-verbose
+verbose output
+.TP
+.B \-V, \-\-version
+display version information
+.SH EXAMPLES
+.TP
+Perform an autostart/execute all programs in the autostart folders.
+.B dex -a
+.TP
+Preview the programs would be executed in a regular autostart.
+.B dex -ad
+.TP
+Preview the programs would be executed in a GNOME specific autostart.
+.B dex -ad -e GNOME
+.TP
+Create a DesktopEntry for a program in the current directory.
+.B dex -c /usr/bin/skype
+.TP
+Execute a single program from command line and enable verbose output.
+.B dex -v skype.desktop

0 comments on commit 21a763e

Please sign in to comment.