Use help2man utility to create a man page. (#178)

Also remove man/timeshift.1.gz as Linux distros provide own
hooks to compress man pages.
This commit is contained in:
Yegor Yefremov 2023-05-08 19:44:57 +02:00 committed by GitHub
parent 0b21b1eded
commit 9668beec48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 129 additions and 127 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
src/timeshift
src/timeshift.1
src/timeshift-gtk
designs/
release/source

11
debian/control vendored
View File

@ -2,7 +2,16 @@ Source: timeshift
Section: utils
Priority: extra
Maintainer: Linux Mint <root@linuxmint.com>
Build-Depends: debhelper-compat (= 10), gzip, valac, libgtk-3-dev, libgee-0.8-dev, libjson-glib-dev, libvte-2.91-dev, libxapp-dev
Build-Depends: debhelper-compat (= 10),
gzip,
valac,
libgtk-3-dev,
libgee-0.8-dev,
libjson-glib-dev,
libvte-2.91-dev,
libxapp-dev,
pkg-config,
help2man,
Standards-Version: 3.9.3
Homepage: https://github.com/linuxmint/timeshift

112
docs/man/timeshift.1 Normal file
View File

@ -0,0 +1,112 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.1.
.TH TIMESHIFT "1" "April 2023" "Timeshift 22.11.2" "User Commands"
.SH NAME
Timeshift \- manual page for Timeshift 22.11.2
.SH DESCRIPTION
Timeshift v22.11.2 by Tony George (teejeetech@gmail.com)
.PP
Syntax:
.IP
timeshift \fB\-\-check\fR
timeshift \fB\-\-create\fR [OPTIONS]
timeshift \fB\-\-restore\fR [OPTIONS]
timeshift \fB\-\-delete\-[all]\fR [OPTIONS]
timeshift \fB\-\-list\-\fR{snapshots|devices} [OPTIONS]
.SH OPTIONS
.SS "List:"
.TP
\fB\-\-list[\-snapshots]\fR
List snapshots
.TP
\fB\-\-list\-devices\fR
List devices
.SS "Backup:"
.TP
\fB\-\-check\fR
Create snapshot if scheduled
.TP
\fB\-\-create\fR
Create snapshot (even if not scheduled)
.TP
\fB\-\-comments\fR <string>
Set snapshot description
.TP
\fB\-\-tags\fR {O,B,H,D,W,M}
Add tags to snapshot (default: O)
.SS "Restore:"
.TP
\fB\-\-restore\fR
Restore snapshot
.TP
\fB\-\-snapshot\fR <name>
Specify snapshot to restore
.HP
\fB\-\-target[\-device]\fR <device> Specify target device
.TP
\fB\-\-grub[\-device]\fR <device>
Specify device for installing GRUB2 bootloader
.TP
\fB\-\-skip\-grub\fR
Skip GRUB2 reinstall
.SS "Delete:"
.TP
\fB\-\-delete\fR
Delete snapshot
.TP
\fB\-\-delete\-all\fR
Delete all snapshots
.SS "Global:"
.HP
\fB\-\-snapshot\-device\fR <device> Specify backup device (default: config)
.TP
\fB\-\-yes\fR
Answer YES to all confirmation prompts
.TP
\fB\-\-btrfs\fR
Switch to BTRFS mode (default: config)
.TP
\fB\-\-rsync\fR
Switch to RSYNC mode (default: config)
.TP
\fB\-\-debug\fR
Show additional debug messages
.TP
\fB\-\-verbose\fR
Show rsync output (default)
.TP
\fB\-\-quiet\fR
Hide rsync output
.TP
\fB\-\-scripted\fR
Run in non\-interactive mode
.TP
\fB\-\-help\fR
Show all options
.SH EXAMPLES
timeshift \-\-list
timeshift \-\-list \-\-snapshot\-device /dev/sda1
timeshift \-\-create \-\-comments "after update" \-\-tags D
timeshift \-\-restore
timeshift \-\-restore \-\-snapshot '2014\-10\-12_16\-29\-08' \-\-target /dev/sda1
timeshift \-\-delete \-\-snapshot '2014\-10\-12_16\-29\-08'
timeshift \-\-delete\-all
.PP
Notes:
.IP
1) \-\-create will always create a new snapshot
2) \-\-check will create a snapshot only if a scheduled snapshot is due
3) Use \-\-restore without other options to select options interactively
4) UUID can be specified instead of device name
5) Default values will be loaded from app config if options are not specified
.SH "SEE ALSO"
The full documentation for
.B Timeshift
is maintained as a Texinfo manual. If the
.B info
and
.B Timeshift
programs are properly installed at your site, the command
.IP
.B info Timeshift
.PP
should give you access to the complete manual.

View File

@ -1,120 +0,0 @@
.\" Manpage for Timeshift.
.TH "Timeshift" "1" "Oct 09, 2022"
.SH NAME
Timeshift -- A Linux application that provides functionality similar to the System Restore feature in Windows and the Time Machine tool in Mac OS
.SH SYNTAX
.B timeshift \-\-check
.br
.TP
.B timeshift \-\-create [OPTIONS]
.br
.TP
.B timeshift \-\-restore [OPTIONS]
.br
.TP
.B timeshift \-\-delete\-[all] [OPTIONS]
.br
.TP
.B timeshift \-\-list\-{snapshots|devices} [OPTIONS]
.br
.SH OPTIONS
.TP
.B \-\-list[\-snapshots]
List snapshots.
.TP
.B \-\-list\-devices
List devices.
.TP
.B \-\-check
Create snapshot if scheduled.
.TP
.B \-\-create
Create snapshot (even if not scheduled).
.TP
.B \-\-comments <string>
Set snapshot description.
.TP
.B \-\-tags {O,B,H,D,W,M}
Add tags to snapshot. (default: O)
.TP
.B \-\-restore
Restore snapshot.
.TP
.B \-\-clone
Clone current system.
.TP
.B \-\-snapshot <name>
Specify snapshot to restore.
.TP
.B \-\-target[-device] <device>
Specify target device.
.TP
.B \-\-grub[-device] <device>
Specify device for installing GRUB2 bootloader.
.TP
.B \-\-skip-grub
Skip GRUB2 reinstall.
.TP
.B \-\-delete
Delete snapshot.
.TP
.B \-\-delete\-all
Delete all snapshots.
.TP
.B \-\-snapshot\-device <device>
Specify backup device. (default: config)
.TP
.B \-\-yes
Answer YES to all confirmation prompts.
.TP
.B \-\-btrfs
Switch to BTRFS mode. (default: config)
.TP
.B \-\-rsync
Swith to RSYNC. (default: config)
.TP
.B \-\-debug
Show additional debug messages.
.TP
.B \-\-verbose
Show rsync output. (default)
.TP
.B \-\-quiet
Hide rsync output.
.TP
.B \-\-scripted
Run in non-interactive mode.
.TP
.B \-\-help
Show all options.
.SH NOTES
.TP
1) \-\-create will always create a new snapshot.
.TP
2) \-\-check will create a snapshot only if a scheduled snapshot is due
.TP
3) Use --restore without other options to select options interactively
.TP
4) UUID can be specified instead of device name
.TP
5) Default values will be loaded from app config if options are not specified
.SH EXAMPLES
.TP
.B timeshift \-\-list
.TP
.B timeshift \-\-list \-\-snapshot-device /dev/sda1
.TP
.B timeshift \-\-create \-\-comments "after update" \-\-tags D
.TP
.B timeshift \-\-restore
.TP
.B timeshift \-\-restore \-\-snapshot '2014\-10\-12_16\-29\-08' \-\-target /dev/sda1
.TP
.B timeshift \-\-delete \-\-snapshot '2014\-10\-12_16\-29\-08'
.TP
.B timeshift \-\-delete-all

View File

@ -1,6 +1,6 @@
SHELL=/bin/bash
CFLAGS=--std=c99
EXECUTABLES = find msgmerge msgfmt install rm mkdir cp chmod valac
EXECUTABLES = find msgmerge msgfmt install rm mkdir cp chmod valac help2man
CHECKEXECS := $(foreach exec,$(EXECUTABLES), $(if $(shell which $(exec)),,$(error No $(exec) found, install it)))
prefix=/usr
@ -59,16 +59,16 @@ app-console:
--pkg gtk+-3.0 --pkg vte-2.91 $(xapp_pkg)
manpage:
./${app_name} --help > ../man/${app_name}.1
gzip -f ../man/${app_name}.1
help2man -o ${app_name}.1 ./${app_name}
clean:
rm -rfv ../release/{source,i386,amd64,armel,armhf}
rm -rfv ../release/*.{run,deb}
rm -rfv *.c *.o *.mo
rm -fv ${app_name} ${app_name}-gtk
rm -fv ${app_name}.1
install:
install: manpage
mkdir -p "$(DESTDIR)$(bindir)"
mkdir -p "$(DESTDIR)$(sharedir)"
mkdir -p "$(DESTDIR)$(mandir)"
@ -103,7 +103,7 @@ install:
install -m 0644 ../files/${app_name}.json "$(DESTDIR)$(appconfdir)/default.json"
# man page
install -m 0644 ../man/${app_name}.1.gz "$(DESTDIR)$(man1dir)/${app_name}.1.gz"
install -m 0644 ${app_name}.1 "$(DESTDIR)$(man1dir)/${app_name}.1"
# app icons
cp -dpr --no-preserve=ownership -t "$(DESTDIR)$(sharedir)/icons" ./share/icons/*
@ -139,7 +139,7 @@ uninstall:
rm -f "$(DESTDIR)$(polkitdir)/in.teejeetech.pkexec.timeshift.policy"
# man page
rm -f "$(DESTDIR)$(man1dir)/${app_name}.1.gz"
rm -f "$(DESTDIR)$(man1dir)/${app_name}.1"
# app icon
rm -f $(DESTDIR)$(sharedir)/icons/hicolor/*/apps/${app_name}.png