#!/bin/bash
# autore BLM² SkaarjIce alias Federico Biglia
# e-mail: piccoloblm@hotmail.com 
# web: http://www.blmsite.tk


if [ $(whoami) != "root" ]; then
	clear	
	echo -n 'Non sei Super User, inserisci la '
	sudo $0
fi

if [ ! -d /usr/share/man/man1/ ]; then
	mkdir -p /usr/share/man/man1/
fi


cd /usr/share/man/man1/

echo "
.\\\" This file was generated with po4a. Translate the source file.
.\\\" 
.\\\" $Id: su.1,v 1.1 2005/04/21 21:03:16 kloczek Exp $
.\\\" Copyright 1989 - 1990, Julianne Frances Haugh
.\\\" All rights reserved.
.\\\"
.\\\" Redistribution and use in source and binary forms, with or without
.\\\" modification, are permitted provided that the following conditions
.\\\" are met:
.\\\" 1. Redistributions of source code must retain the above copyright
.\\\"    notice, this list of conditions and the following disclaimer.
.\\\" 2. Redistributions in binary form must reproduce the above copyright
.\\\"    notice, this list of conditions and the following disclaimer in the
.\\\"    documentation and/or other materials provided with the distribution.
.\\\" 3. Neither the name of Julianne F. Haugh nor the names of its contributors
.\\\"    may be used to endorse or promote products derived from this software
.\\\"    without specific prior written permission.
.\\\"
.\\\" THIS SOFTWARE IS PROVIDED BY JULIE HAUGH AND CONTRIBUTORS ``AS IS'' AND
.\\\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\\\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\\\" ARE DISCLAIMED.  IN NO EVENT SHALL JULIE HAUGH OR CONTRIBUTORS BE LIABLE
.\\\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\\\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\\\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\\\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\\\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\\\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\\\" SUCH DAMAGE.
.TH blmman 1   
.SH NOME
blmman \- visualizzatore di struttura man
.SH SINTASSI
\fBman blmman\fP
.SH DESCRIZIONE
\fBblmman\fP serve per capire come\' la sintassi dei file man.
.PP

 .TH  <<-- mette ad apice
.PP

 .SH  <<-- mette a titolo
.PP

 .PP  <<-- va a capo con spaizamento 
.PP

 .br  <<-- manda a capo
.PP

 \\fB \fBblm\fP \\fP  <<-- mette e togle il grassetto
.br
			(dove \\fP chiude lo stile applicato)
.PP

 \\fI \fIblm\fP \\fP  <<-- mette e toglie la sottolinatura
.br
			(dove \\fP chiude lo stile applicato)
.PP
 .\\\"  <<-- definisce che tutto cio\' che e\' scritto dopo, e\' un commento

Vicino a caratteri particolari, bisogna metterci la barra \\ per difinire che il carattere dopo sia un carattere e non un comando.
.PP
Per creare un man e\' necessario creare il file testo senza nessun\' estensione poi con gzip comprimerlo e metterlo nella cartella \fI/usr/share/man/\fP esmpio per compriemere e spostare il file utilizzate:
.br
	# gzip -c blmman.1 > blmman.1.gz
.br
	# cp blmman.1.gz /usr/share/man/it/man1/
.PP
Il carattere \".\" ad inizio riga sta a definire un particolare comando.
.PP
La seguente \"guida\" e\' sicuramente piena di errori, ma e\' una prima infarinatura.

.SH FILE
\fI/usr/share/man/it/man1/blm.1.gz\fP	\- questo file man da poter esplorare

.SH AUTORE
.nf
BLM² SkaarjIce alias Federico Biglia <piccoloblm@hotmail.com>, 2007
.fi" > blmman.1
gzip blmman.1 > blmman.1.gz

if [ ! -d /usr/share/man/it/man1/ ]; then
	mkdir -p /usr/share/man/it/man1/
fi

cp blmman.1.gz /usr/share/man/it/man1/

sudo -k

clear
if [ -f /usr/share/man/it/man1/blmman.1.gz -o /usr/share/man/man1/blmman.1.gz ]; then
	echo 'Installato correttamente'
else
	echo 'Installazione errata'
fi
