Browse Source

README.md, man and help updated

main
Blau Araujo 1 year ago
parent
commit
2dee828bd0
  1. 15
      Makefile
  2. 33
      README.md
  3. 17
      upt
  4. 41
      upt.1

15
Makefile

@ -0,0 +1,15 @@
PREFIX ?= /usr
MANDIR ?= $(PREFIX)/share/man
all:
echo Run \'make install\' to install upt.
install:
mkdir -p $(DESTDIR)$(PREFIX)/bin
mkdir -p $(DESTDIR)$(MANDIR)/man1
cp -p upt $(DESTDIR)$(PREFIX)/bin/upt
cp -p upt.1 $(DESTDIR)$(MANDIR)/man1
uninstall:
rm -rf $(DESTDIR)$(PREFIX)/bin/upt
rm -rf $(DESTDIR)$(MANDIR)/man1/upt.1*

33
README.md

@ -11,8 +11,35 @@ upt [OPÇÕES]
## Opções
```
-d Exibe vírgulas.
-p Exibe o prefixo.
-d Exibe tempos separados por vírgulas.
-p Exibe prefixo antes do tempo de atividade.
-s Data e hora do início da atividade.
-h Exibe esta ajuda e sai.
-h Exibe ajuda e sai.
```
## Dependências
- Bash 5+
- GNU date (coreutils)
## Instalação
Clone este repositório:
```
git clone https://git.blauaraujo.com/blau_araujo/upt.git
```
Como **root**, entre no diretório onde o `upt` foi clonado e execute:
```
make install
```
## Uninstall
Como **root**, entre no diretório onde o `upt` foi clonado e execute
```
make uninstall
```

17
upt

@ -6,6 +6,8 @@
# There is NO WARRANTY, to the extent permitted by law.
# ------------------------------------------------------------------------------
version=0.0.1
prefix='Uptime: '
format='%A, %d de %B de %Y, às %Rh'
@ -14,7 +16,8 @@ u[0]='dia'
u[1]='hora'
u[2]='minuto'
help='
help="upt ($version) - Tempo de atividade do sistema.
USO
upt [OPÇÕES]
@ -22,17 +25,17 @@ DESCRIÇÃO
Exibe o tempo de atividade do sistema.
OPÇÕES
-d Exibe vírgulas.
-p Exibe o prefixo.
-s Data e hora do início da atividade.
-h Exibe esta ajuda e sai.
-d Exibe seperação com vírgulas.
-p Exibe prefixo antes do tempo de atividade.
-s Data e hora do início da atividade.
-h Exibe esta ajuda e sai.
Copyright (C) 2022 Blau Araujo <blau@debxp.org>
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
'
"
seconds() {
: "$(< /proc/uptime)"
@ -77,4 +80,4 @@ done
echo $uptime
exit
exit

41
upt.1

@ -0,0 +1,41 @@
.TH UPT "1" "Mar 2022" "UPT 0.0.1" "Tempo de atividade do sistema"
.\" Text automatically generated by txt2man
.RS
.SH NOME
\fBupt\fP - Exibe o tempo de atividade do sistema.
.SH SINOPSE
.nf
.fam C
\fBupt\fP [OPÇÕES]
.fam T
.fi
.fam T
.fi
.SH DESCRIÇÃO
Quando executado sem opções, \fBupt\fP exibe o tempo total de atividade do sistema com as informações de \fBDIAS\fP, \fBHORAS\fP e \fBMINUTOS\fP seguidas de suas respectivas unidades. As informações com valor `0' (zero), são ocultadas. Para obter a data e o horário do início das atividades, utiliza-se a opção \fB-s\fP.
.SH OPÇÕES
.TP
\fB-d\fP
Exibe tempos de atividade separados por vírgulas.
.TP
\fB-p\fP
Exibe prefixo antes do tempo de atividade.
.TP
\fB-s\fP
Data e hora do início da atividade do sistema.
.TP
\fB-h\fP
Exibe ajuda e sai.
.SH SEE ALSO
<https://git.blauaraujo.com/blau_araujo/upt>
.SH REPORTING BUGS
<https://git.blauaraujo.com/blau_araujo/upt/issues>
.SH AUTHORS
Written by Blau Araujo <blau@debxp.org>
.SH COPYRIGHT
Copyright©2022, Blau Araujo.
.PP
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
.PP
This is free software: you are free to change and redistribute it. There is NO WARRANTY,
to the extent permitted by law.
Loading…
Cancel
Save