Skip to content

Commit e5f254b

Browse files
phyverPH
authored andcommitted
possibility of a system-wide gameshell.sh, with specific manpage
When calling a self extracting archive gameshell.sh, it can be extracted in several places. (Save files are created in the same place.) - With the flag -W DIR, the archive is extracted in DIR. - If the archive (possibly a save file) is inside a directory without the full rwx permissions, the archive is extracted inside $HOME/.gameshell That way, a global gameshell.sh can be used for all users of a system, and each user will get a personal savefile. - In other cases, the archive is extracted next to the self-extracting file. This is documented in a new gameshell.sh.1 manpage (only in English). This man page is available from within Gameshell (not very useful) but could be installed in standard man page directories if Gameshell is installed globally. NOTE: several corrections have been added to all manpages.
1 parent fa175bb commit e5f254b

37 files changed

+1894
-236
lines changed

i18n/en.po

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
11
# AUTOMATICALLY GENERATED -- DO NOT EDIT
2-
#, sh-format
3-
msgid "$GSH_ROOT/i18n/gsh-full-help/en.txt"
4-
msgstr "$GSH_ROOT/i18n/gsh-full-help/en.txt"
5-
6-
#, sh-format
7-
msgid "$GSH_ROOT/i18n/gsh-help/en.txt"
8-
msgstr "$GSH_ROOT/i18n/gsh-help/en.txt"
9-
102
#, sh-format
113
msgid "$GSH_ROOT/i18n/gameshell-init-msg-short/en.txt"
124
msgstr "$GSH_ROOT/i18n/gameshell-init-msg-short/en.txt"
@@ -19,6 +11,14 @@ msgstr "$GSH_ROOT/i18n/gameshell-init-msg/en.txt"
1911
msgid "$GSH_ROOT/i18n/gameshell-welcome/en.txt"
2012
msgstr "$GSH_ROOT/i18n/gameshell-welcome/en.txt"
2113

14+
#, sh-format
15+
msgid "$GSH_ROOT/i18n/gsh-full-help/en.txt"
16+
msgstr "$GSH_ROOT/i18n/gsh-full-help/en.txt"
17+
18+
#, sh-format
19+
msgid "$GSH_ROOT/i18n/gsh-help/en.txt"
20+
msgstr "$GSH_ROOT/i18n/gsh-help/en.txt"
21+
2222
#, sh-format
2323
msgid "$GSH_ROOT/i18n/start-full-help/en.txt"
2424
msgstr "$GSH_ROOT/i18n/start-full-help/en.txt"

i18n/fr.po

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,6 @@ msgstr "Content-Type: text/plain; charset=UTF-8\n"
33
"Content-Transfer-Encoding: 8bit\n"
44
"Plural-Forms: nplurals=2; plural=n>1;\n"
55

6-
#, sh-format
7-
msgid "$GSH_ROOT/i18n/gsh-full-help/en.txt"
8-
msgstr "$GSH_ROOT/i18n/gsh-full-help/fr.txt"
9-
10-
#, sh-format
11-
msgid "$GSH_ROOT/i18n/gsh-help/en.txt"
12-
msgstr "$GSH_ROOT/i18n/gsh-help/fr.txt"
13-
146
#, sh-format
157
msgid "$GSH_ROOT/i18n/gameshell-init-msg-short/en.txt"
168
msgstr "$GSH_ROOT/i18n/gameshell-init-msg-short/fr.txt"
@@ -23,6 +15,14 @@ msgstr "$GSH_ROOT/i18n/gameshell-init-msg/fr.txt"
2315
msgid "$GSH_ROOT/i18n/gameshell-welcome/en.txt"
2416
msgstr "$GSH_ROOT/i18n/gameshell-welcome/fr.txt"
2517

18+
#, sh-format
19+
msgid "$GSH_ROOT/i18n/gsh-full-help/en.txt"
20+
msgstr "$GSH_ROOT/i18n/gsh-full-help/fr.txt"
21+
22+
#, sh-format
23+
msgid "$GSH_ROOT/i18n/gsh-help/en.txt"
24+
msgstr "$GSH_ROOT/i18n/gsh-help/fr.txt"
25+
2626
#, sh-format
2727
msgid "$GSH_ROOT/i18n/start-full-help/en.txt"
2828
msgstr "$GSH_ROOT/i18n/start-full-help/fr.txt"

i18n/gsh-full-help/en.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ gsh check
1515

1616
gsh exit
1717
quit GameShell
18-
Note that you can exit GameShell using Control-d as well
18+
Note that you can exit GameShell using Control-d as well.
1919

2020
gsh goal [N]
2121
show the current mission's goal
22-
if N is given, show the goal for mission N
22+
If N is given, show the goal for mission N.
2323

2424
gsh help
2525
short help message
@@ -34,14 +34,14 @@ Admin commands
3434
gsh auto
3535
source the current mission's automatic script, if it exists
3636

37-
gsh goto [N]
37+
gsh goto N
3838
directly go to mission N
39-
(Note: no password necessary if N is a previous mission)
39+
Note: the password is not necessary if N is an earlier mission.
4040

4141
gsh skip
4242
give up on the current mission and go to the next one
43-
(no password necessary if the mission was completed at least
44-
once)
43+
Note: the password is not necessary if the mission was completed at least
44+
once.
4545

4646

4747
Additional commands
@@ -69,8 +69,8 @@ gsh assert condition [MSG]
6969

7070
gsh assert check true/false [MSG]
7171
check the current mission's goal has been achieved
72-
if the result doesn't coincide with the expected result, display
73-
an error message
72+
If the result doesn't coincide with the expected result, display
73+
an error message.
7474

7575
gsh env
7676
display internal environment variables
@@ -79,7 +79,7 @@ gsh hardreset
7979
reset the current mission by restarting the shell
8080

8181
gsh HELP
82-
this message
82+
show advanced usage status, with all existing Gameshell commands
8383

8484
gsh log [-v]
8585
show the log file of gsh commands

i18n/gsh-full-help/fr.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ gsh check
1414

1515
gsh exit
1616
quitte (et sauvegarde) la partie en cours
17-
vous pouvez également quitter avec Contrôle-d
17+
Vous pouvez également quitter avec Contrôle-d.
1818

1919
gsh goal [N]
2020
affiche l'objectif de la mission en cours
21-
si N est donné, affiche l'objectif de la mission N
21+
Si N est donné, affiche l'objectif de la mission N.
2222

2323
gsh help
2424
affiche un petit message d'aide
@@ -33,15 +33,15 @@ Commandes d'administration
3333
gsh auto
3434
lance le script automatique de la mission en cours, s'il existe.
3535

36-
gsh goto [N]
36+
gsh goto N
3737
passe directement à la mission N
38-
(le mot de passe n'est pas nécessaire si N est une mission
39-
précédente)
38+
Le mot de passe n'est pas nécessaire si N est une mission
39+
précédente.
4040

4141
gsh skip
4242
abandonne la mission en cours et passe à la suivante
43-
(le mot de passe n'est pas nécessaire si la mission a déjà été
44-
réussie)
43+
Le mot de passe n'est pas nécessaire si la mission a déjà été
44+
réussie.
4545

4646

4747

@@ -80,7 +80,7 @@ gsh hardreset
8080
ré-initialise la mission en cours en redémarrant le shell
8181

8282
gsh HELP
83-
affiche ce message
83+
affiche un message d'aide complet, avec toutes les commandes Gameshell existantes
8484

8585
gsh log [-v]
8686
affiche le fichier de log des commandes gsh

i18n/gsh-help/en.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ gsh check
77

88
gsh exit
99
quit GameShell
10-
Note that you can exit GameShell using Control-d as well
10+
Note that you can exit GameShell using Control-d as well.
1111

1212
gsh goal [N]
1313
show the current mission's goal
14-
if N is given, show the goal for mission N
14+
If N is given, show the goal for mission N.
1515

1616
gsh help
1717
short help message

i18n/gsh-help/fr.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ gsh check
66

77
gsh exit
88
quitte (et sauvegarde) la partie en cours
9-
vous pouvez également quitter avec Contrôle-d
9+
Vous pouvez également quitter avec Contrôle-d.
1010

1111
gsh goal [N]
1212
affiche l'objectif de la mission en cours
13-
si N est donné, affiche l'objectif de la mission N
13+
Si N est donné, affiche l'objectif de la mission N.
1414

1515
gsh help
1616
affiche un petit message d'aide

i18n/it.po

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,6 @@ msgstr "Project-Id-Version: \n"
1313
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
1414
"X-Generator: Lokalize 22.04.1\n"
1515

16-
#, sh-format
17-
msgid "$GSH_ROOT/i18n/gsh-full-help/en.txt"
18-
msgstr "$GSH_ROOT/i18n/gsh-full-help/it.txt"
19-
20-
#, sh-format
21-
msgid "$GSH_ROOT/i18n/gsh-help/en.txt"
22-
msgstr "$GSH_ROOT/i18n/gsh-help/it.txt"
23-
2416
#, sh-format
2517
msgid "$GSH_ROOT/i18n/gameshell-init-msg-short/en.txt"
2618
msgstr "$GSH_ROOT/i18n/gameshell-init-msg-short/it.txt"
@@ -33,6 +25,14 @@ msgstr "$GSH_ROOT/i18n/gameshell-init-msg/it.txt"
3325
msgid "$GSH_ROOT/i18n/gameshell-welcome/en.txt"
3426
msgstr "$GSH_ROOT/i18n/gameshell-welcome/it.txt"
3527

28+
#, sh-format
29+
msgid "$GSH_ROOT/i18n/gsh-full-help/en.txt"
30+
msgstr "$GSH_ROOT/i18n/gsh-full-help/it.txt"
31+
32+
#, sh-format
33+
msgid "$GSH_ROOT/i18n/gsh-help/en.txt"
34+
msgstr "$GSH_ROOT/i18n/gsh-help/it.txt"
35+
3636
#, sh-format
3737
msgid "$GSH_ROOT/i18n/start-full-help/en.txt"
3838
msgstr "$GSH_ROOT/i18n/start-full-help/it.txt"

i18n/source/Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
all: gsh-commands gameshell
2+
3+
gsh-commands:
4+
make -C ./gsh-commands
5+
6+
gameshell:
7+
make -C ./gameshell
8+
9+
install: all
10+
make -C ./gameshell install
11+
make -C ./gsh-commands install
12+
13+
14+
.PHONY: all gsh-commands gameshell
15+

i18n/source/gameshell/Makefile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
MANPATH = ../../../man
2+
HELPPATH = ../..
3+
4+
LANGS = en
5+
MANPAGES = $(addsuffix .1, $(LANGS))
6+
7+
clean = sed -f ../clean.sed
8+
include_files = awk -f ../include_files.awk
9+
10+
all: $(MANPAGES)
11+
12+
install: all
13+
@mkdir -p $(MANPATH)/man1/
14+
for file in ??.1; do mkdir -p $(MANPATH)/$${file%.1}/man1/; cp "$$file" "$(MANPATH)/$${file%.1}/man1/gameshell.sh.1"; done
15+
mv $(MANPATH)/en/man1/* $(MANPATH)/man1/
16+
rmdir $(MANPATH)/en/man1/
17+
18+
%.txt: %/*.txt
19+
$(include_files) $*/man_gameshell.txt > $@
20+
21+
# NOTE: english man page should go to the default man/man1 directory
22+
en.1: en.txt
23+
a2x --doctype manpage --format manpage $<
24+
@mkdir -p $(MANPATH)/man1/
25+
mv gameshell.sh.1 $@
26+
27+
# NOTE: translated man pages should go to the man/LANGUAGE/man1 directory
28+
%.1: %.txt
29+
a2x --doctype manpage --format manpage $<
30+
@mkdir -p $(MANPATH)/$*/man1/
31+
mv gameshell.sh.1 $@
32+
33+
clean:
34+
rm -f *.1 *.html *.txt
35+
36+
.PHONY: clean all

0 commit comments

Comments
 (0)