commit 525c614d5ca9b24802f6213c7ee139240147be9c
parent 027581786d5db239f91f75a8a425f8dd3c704daf
Author: GeaRSiX <gearsix@tuta.io>
Date: Mon, 27 Jul 2020 15:50:38 +0100
added man file
Diffstat:
M | Makefile | | | 9 | +++++++-- |
A | src/dotfm.1 | | | 76 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
2 files changed, 83 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
@@ -1,5 +1,6 @@
CURRDIR=$(shell pwd)
-DESTDIR=/usr/local/bin
+DESTBINDIR=/usr/local/bin
+DESTMANDIR=/usr/local/man
NAME=dotfm
all: none
@@ -8,11 +9,15 @@ none:
@echo 'nothing to do, just run "make install", or "make uninstall"'
install:
- install -pDm755 ${CURRDIR}/src/${NAME}.py ${DESTDIR}/${NAME}
+ install -pDm755 ${CURRDIR}/src/${NAME}.py ${DESTBINDIR}/${NAME}
+ install ${CURRDIR}/src/${NAME}.1 ${DESTMANDIR}/man1/${NAME}.1
+ ln -s ${DESTMANDIR}/man1/${NAME}.1 /usr/share/man/man1/${NAME}1
link:
ln -s ${CURRDIR}/src/${NAME}.py ${DESTDIR}/${NAME}
@echo 'WARNING! moving ${CURRDIR}/src/dotfm.py will break this link'
+ install ${CURRDIR}/src/${NAME}.1 ${DESTMANDIR}/man1/${NAME}.1
+ ln -s ${DESTMANDIR}/man1/${NAME}.1 /usr/share/man/man1/${NAME}1
uninstall:
rm -f ${DESTDIR}/${NAME}
diff --git a/src/dotfm.1 b/src/dotfm.1
@@ -0,0 +1,76 @@
+.\" Text automatically generated by txt2man (txt2man -d "20 July 2020" -t dotfm -s 1 -v "README" -r "v2.0.0" -s 1 README >> src/dotfm.1)
+.TH dotfm 1 "20 July 2020" "v2.0.0" "README"
+.SH NAME
+\fBdotfm \fP- a simple script to manage dotfiles.
+\fB
+.SH SYNOPSIS
+.nf
+.fam C
+\fBdotfm\fP [\fB-h\fP] [\fB-d\fP] [\fB-v\fP] [\fB-q\fP] \fICOMMAND\fP DOTFILE\.\.\.
+
+.fam T
+.fi
+.fam T
+.fi
+.SH DESCRIPTION
+\fBdotfm\fP is designed to be simple and easy to use. It's really just a short-hand for managing symlinks of dotfiles (it's also helpful if you don't want to remember or type out the location of a dotfile everytime you want to modify it).
+.SH ARGUMENTS
+.TP
+.B
+\fB-h\fP \fB--help\fP
+Displays help printout
+.TP
+.B
+\fB-d\fP \fB--debug\fP
+Display debug logs
+.TP
+.B
+\fB-v\fP \fB--version\fP
+Display \fBdotfm\fP version
+.TP
+.B
+\fB-q\fP \fB--quiet\fP
+Tell \fBdotfm\fP to shutup (hide info logs)
+.SH COMMANDS
+Multiple DOTFILE args can be passed to each command.
+.TP
+.B
+install <DOTFILE>\.\.\.
+DOTFILE should be a filepath of the dotfile to install.
+If the filename of DOTFILE is known, a symlink will be created at the install location (found in KNOWN_LOCATIONS).
+If the filename is not recognised, then you'll be prompted for an install location an aliases to call the dotfile by.
+.TP
+.B
+remove <DOTFILE>\.\.\.
+DOTFILE should be an alias for the dotfile to remove.
+Remove the file located at the install location of the dotfile with an alias matching DOTFILE. Will only remove if the file has been installed by \fBdotfm\fP (found in DOTFM_CSV_FILE).
+.TP
+.B
+edit <DOTFILE>\.\.\.
+DOTFILE should be an alias for the dotfile to edit.
+Open the corresponding DOTFILE in $EDITOR or (if $EDITOR is not set) nano.
+.TP
+.B
+list [<DOTFILE>\.\.\.]
+DOTFILE is optional, if set it should be an alias of the dotfile to list.
+Display a table of the install location and aliases of all or specified dotfiles.
+.SH INSTALL
+Go to the source folder of \fBdotfm\fP and run either "sudo make link" or "sudo make install".
+The link option will create a symlink of the script from it's current location (useful if you want to modify it frequently).
+The install option will copy it to the install location (recommended for most users).
+.PP
+By default the install location of \fBdotfm\fP is /usr/local/bin/\fBdotfm\fP. To modify this, just edit the value of DESTBINDIR in the Makefile.
+.SH UNINSTALL
+Go to the source folder of \fBdotfm\fP and run "sudo make uninstall"
+.SH ENVIRONMENT
+.TP
+.B
+EDITOR
+The text editor to edit dotfiles with. If not present, nano will be used.
+.SH KNOWN DOTFILES
+I would recommend modifying the "KNOWN_DOTFILES" array in src/dotfm.py to suite your own needs. I've tried to put most of the standard dotfiles in there, however it's not exhaustive (although I do plan on adding to it over-time).
+.PP
+Doing this will allow you to easily install dotfiles that you often use which aren't currently present KNOWN_DOTFILES (instead of having to specify the install location and aliases for it everytime).
+.SH AUTHORS
+.IP \(bu 3
+gearsix <gearsix@tuta.io>