@@ -163,15 +163,15 @@ mkdir "$TMP_DIR/$NAME"
163163# copy source files
164164# NOTE: macOS' cp doesn't have '--archive', and '-a' is not POSIX.
165165# use POSIX options to make sure it is portable
166- cp -RPp " $GSH_ROOT /start.sh" " $GSH_ROOT /scripts" " $GSH_ROOT /utils" " $GSH_ROOT /lib" " $GSH_ROOT /i18n" " $TMP_DIR /$NAME "
166+ cp -RPp " $GSH_ROOT /start.sh" " $GSH_ROOT /scripts" " $GSH_ROOT /utils" " $GSH_ROOT /lib" " $GSH_ROOT /i18n" " $GSH_ROOT /man " " $ TMP_DIR /$NAME "
167167
168168
169169# generate default index file
170170ALL_INDEX_FILES=default.idx
171171mkdir " $TMP_DIR /$NAME /missions"
172172if ! make_index " $@ " > " $TMP_DIR /$NAME /missions/default.idx"
173173then
174- echo " Error: archive .sh, couldn't make default.idx"
174+ echo " Error: gameshell_archive .sh, couldn't make default.idx"
175175 # --system makes GameShell use the standard rm utility instead of the "safe"
176176 # rm implemented in scripts/rm
177177 rm --system -rf " $TMP_DIR "
186186 ALL_INDEX_FILES=" $ALL_INDEX_FILES :$( basename " $FILE " ) "
187187 if ! make_index " $FILE " > " $TMP_DIR /$NAME /missions/$( basename " $FILE " ) "
188188 then
189- echo " Error: archive .sh, couldn't make $( basename " $FILE " ) "
189+ echo " Error: gameshell_archive .sh, couldn't make $( basename " $FILE " ) "
190190 # --system makes GameShell use the standard rm utility instead of the "safe"
191191 # rm implemented in scripts/rm
192192 rm --system -rf " $TMP_DIR "
@@ -297,6 +297,22 @@ then
297297 fi
298298 done
299299 done
300+
301+ # remove translated manual pages
302+ find " $GSH_ROOT /man" -type d | while read -r dir
303+ do
304+ if [ " $( basename " $dir " ) " = " man1" ] || [ " $( basename " $dir " ) " = " man" ]
305+ then
306+ continue
307+ fi
308+ if ! keep_language " $dir " " $LANGUAGES "
309+ then
310+ # --system makes GameShell use the standard rm utility instead of the "safe"
311+ # rm implemented in scripts/rm
312+ printf " ."
313+ rm --system -rf " $dir "
314+ fi
315+ done
300316 echo
301317fi
302318
@@ -366,6 +382,9 @@ echo "removing unnecessary files"
366382 [ " $KEEP_TEST " -ne 1 ] && find ./missions -name " test.sh" | xargs rm --system -f
367383 [ " $KEEP_AUTO " -ne 1 ] && find ./missions -name auto.sh | xargs rm --system -f
368384 rm --system -rf " $GSH_ROOT /utils/"
385+ rm --system -f " $GSH_ROOT /i18n/gamesh-commands"
386+ rm --system -f " $GSH_ROOT /man/en"
387+ rm --system -f " $GSH_ROOT /man/README" " $GSH_ROOT /i18n/gameshell-*help/README"
369388)
370389
371390# change admin password
0 commit comments