1 /*  -*- buffer-read-only: t -*- vi: set ro:
2  *
3  * DO NOT EDIT THIS FILE   (scripts.x)
4  *
5  * It has been AutoGen-ed
6  * From the definitions    scripts.def
7  * and the template file   scripts.tpl
8  *
9  * shar is free software: you can redistribute it and/or modify it
10  * under the terms of the GNU General Public License as published by the
11  * Free Software Foundation, either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * shar is distributed in the hope that it will be useful, but
15  * WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17  * See the GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License along
20  * with this program.  If not, see <http://www.gnu.org/licenses/>.
21  *
22  *  This file defines the shell script strings in C format.
23  *  The compiler will reconstruct the original string found in scripts.def.
24  *  shar.c will emit these strings into the constructed shar archive.
25  *  See "scripts.def" for rationale.
26  */
27 #ifndef SHAR_SCRIPTS_X_GUARD
28 #define SHAR_SCRIPTS_X_GUARD 1
29 
30 static const char aok_check_z[14] =
31 "test $? -eq 0";
32 
33 static const char break_line_z[35] =
34 "# ============= %s ==============\n";
35 
36 static const char ck_chct_z[53] =
37 "test `LC_ALL=C wc -c < %s` -ne %s && \\\n\
38   ${echo} %s\n";
39 
40 static const char ck_lockdir_z[22] =
41 "test ! -d ${lock_dir}";
42 
43 static const char clobber_check_z[74] =
44 "if test \"X$1\" = \"X-c\"\n\
45 then keep_file=''\n\
46 else keep_file=true\n\
47 fi\n\
48 echo=echo\n";
49 
50 static const char contents_z[113] =
51 "#\n\
52 # This shar contains:\n\
53 # length mode       name\n\
54 # ------ ---------- ------------------------------------------\n";
55 
56 static const char continue_archive_z[167] =
57 "#!/bin/sh\n\
58 # This is '%s' (part %d of %s).\n\
59 # Do not concatenate these parts, unpack them in order with '/bin/sh'.\n\
60 # File '%s' is being continued...\n\
61 #\n\
62 lock_dir=_sh%05d\n";
63 
64 static const char cut_mark_line_z[50] =
65 "---- Cut Here and feed the following to sh ----\n\n";
66 
67 static const char dev_tty_check_z[83] =
68 "if test -n \"`ls /dev/tty 2>/dev/null`\"\n\
69 then shar_tty=/dev/tty\n\
70 else shar_tty= ; fi\n";
71 
72 static const char dev_tty_nocheck_z[31] =
73 "shar_tty=\n\
74 shar_n=\n\
75 shar_c='\\n'\n";
76 
77 static const char dir_check_z[23] =
78 "if test ! -d %s; then\n";
79 
80 static const char dir_create_z[12] =
81 "  mkdir %s\n";
82 
83 static const char echo_checks_z[202] =
84 "if (echo \"testing\\c\"; echo 1,2,3) | grep c >/dev/null\n\
85 then if (echo -n test; echo 1,2,3) | grep n >/dev/null\n\
86      then shar_n= shar_c='\n\
87 '\n\
88      else shar_n=-n shar_c= ; fi\n\
89 else shar_n= shar_c='\\c' ; fi\n";
90 
91 static const char echo_string_z[12] =
92 "${echo} %s\n";
93 
94 static const char exist_note_z[24] =
95 "#\n\
96 # Existing files %s.\n";
97 
98 static const char exist_keep_z[52] =
99 "will *not* be overwritten, unless '-c' is specified";
100 
101 static const char exist_kill_z[20] =
102 "WILL be overwritten";
103 
104 static const char exist_ask_z[65] =
105 "MAY be overwritten.\n\
106 # The unsharer will be INTERACTIVELY queried";
107 
108 static const char explain_1_z[40] =
109 "This is part 1 of a multipart archive.\n";
110 
111 static const char explain_2_z[70] =
112 "Do not concatenate these parts, unpack them in order with '/bin/sh'.\n";
113 
114 static const char explain_fmt_fmt_z[20] =
115 "# %%-%ds\n\
116 # %%-%ds\n\n";
117 
118 static const char file_leader_z[218] =
119 "#!/bin/sh\n\
120 # This is %s%s archive (produced by GNU %s %s).\n\
121 # To extract the files from this archive, save it to some FILE, remove\n\
122 # everything before the '#!/bin/sh' line above, then type 'sh FILE'.\n\
123 #\n\
124 lock_dir=_sh%05d\n";
125 
126 static const char i18n_z[758] =
127 "save_IFS=\"${IFS}\"\n\
128 IFS=\"${IFS}:\"\n\
129 gettext_dir=\n\
130 locale_dir=\n\
131 set_echo=false\n\n\
132 for dir in $PATH\n\
133 do\n\
134   if test -f $dir/gettext \\\n\
135      && ($dir/gettext --version >/dev/null 2>&1)\n\
136   then\n\
137     case `$dir/gettext --version 2>&1 | sed 1q` in\n\
138       *GNU*) gettext_dir=$dir\n\
139       set_echo=true\n\
140       break ;;\n\
141     esac\n\
142   fi\n\
143 done\n\n\
144 if ${set_echo}\n\
145 then\n\
146   set_echo=false\n\
147   for dir in $PATH\n\
148   do\n\
149     if test -f $dir/shar \\\n\
150        && ($dir/shar --print-text-domain-dir >/dev/null 2>&1)\n\
151     then\n\
152       locale_dir=`$dir/shar --print-text-domain-dir`\n\
153       set_echo=true\n\
154       break\n\
155     fi\n\
156   done\n\n\
157   if ${set_echo}\n\
158   then\n\
159     TEXTDOMAINDIR=$locale_dir\n\
160     export TEXTDOMAINDIR\n\
161     TEXTDOMAIN=sharutils\n\
162     export TEXTDOMAIN\n\
163     echo=\"$gettext_dir/gettext -s\"\n\
164   fi\n\
165 fi\n\
166 IFS=\"$save_IFS\"\n";
167 
168 static const char lock_dir_z[12] =
169 "${lock_dir}";
170 
171 static const char made_on_comment_z[23] =
172 "# Made on %s by <%s>.\n";
173 
174 static const char make_lock_dir_z[18] =
175 "mkdir ${lock_dir}";
176 
177 static const char md5check_z[165] =
178 "MD5SUM=${MD5SUM-md5sum}\n\
179 f=`${MD5SUM} --version | egrep '^md5sum .*(core|text)utils'`\n\
180 test -n \"${f}\" && md5check=true || md5check=false\n\
181 ${md5check} || \\\n\
182   echo '%s'\n";
183 
184 static const char md5test_z[99] =
185 "  if ${md5check}\n\
186   then (\n\
187        ${MD5SUM} -c >/dev/null 2>&1 || ${echo} %s: '%s'\n\
188        ) << \\%s\n";
189 
190 static const char mode_fmt_z[14] =
191 "begin 600 %s\n";
192 
193 static const char otherwise_z[7] =
194 "\n\
195 else\n";
196 
197 static const char pre_exist_z[46] =
198 "if test -n \"${keep_file}\" && test -f %s\n\
199 then\n";
200 
201 static const char query_answers_z[769] =
202 "ans_yes='%s'    yes_means='%s'\n\
203 ans_no='%s'     no_means='%s'\n\
204 ans_all='%s'    all_means='%s'\n\
205 ans_none='%s'   none_means='%s'\n\
206 ans_help='%s'   help_means='%s'\n\
207 ans_quit='%s'   quit_means='%s'\n\
208 user_answers='no yes all none help quit'\n\
209 shar_wish='no'\n\
210 ans_list=\"\n\
211 [<${ans_no}>, ${ans_yes}, ${ans_all}, ${ans_none}, ${ans_help}, ${ans_quit}] ? \"\n\n\
212 eval_ans='\n\
213 if test -z \"${shar_wish}\" ; then answer=no ; else\n\
214   answer='help'\n\
215   case \"${ans_yes}\"  in \"${shar_wish}\"* ) answer=yes  ; break ;; esac\n\
216   case \"${ans_no}\"   in \"${shar_wish}\"* ) answer=no   ; break ;; esac\n\
217   case \"${ans_all}\"  in \"${shar_wish}\"* ) answer=all  ; break ;; esac\n\
218   case \"${ans_none}\" in \"${shar_wish}\"* ) answer=none ; break ;; esac\n\
219   case \"${ans_quit}\" in \"${shar_wish}\"* ) answer=quit ; break ;; esac\n\
220 fi'\n";
221 
222 static const char query_check_z[246] =
223 "  case \"${shar_wish}\" in\n\
224     quit) ${echo} '%s'; exit 1 ;;\n\
225     none) ${echo} 'x - %s' ; shar_skip=yes ;;\n\
226     no)   shar_skip=yes ;;\n\
227     yes | all)  shar_skip=no  ;;\n\
228   esac\n\
229 else\n\
230   shar_skip=no\n\
231 fi\n\
232 if test $shar_skip = yes; then\n\
233   ${echo} 'x - %s'\n";
234 
235 static const char query_user_z[480] =
236 "  while : ; do\n\
237     answer=${shar_wish}\n\
238     case $shar_wish in\n\
239       all) ${echo} %s ; break ;;\n\
240       none) break ;;\n\
241       *) ${echo} $shar_n \"? - %s${ans_list}\"$shar_c\n\
242          if test -n \"$shar_tty\"\n\
243          then read shar_wish < $shar_tty\n\
244          else read shar_wish\n\
245          fi\n\
246          eval \"${eval_ans}\" ;;\n\
247     esac\n\
248     shar_wish=help\n\
249     for f in ${user_answers}\n\
250     do eval printf \"'%%-9s %%s\\n'\" \\\"\\${ans_${f}}\\\" \\\"\\${${f}_means}\\\"\n\
251     done\n\
252   done\n\
253   shar_wish=${answer}\n";
254 
255 static const char seq_check_z[156] =
256 "test -r ${lock_dir}/seq || {\n\
257   ${echo} '%s' >&2\n\
258   exit 1\n\
259 }\n\
260 shar_sequence=`cat ${lock_dir}/seq`\n\
261 test \"$shar_sequence\" = %d || {\n\
262   ${echo} %s >&2\n\
263   exit 1\n\
264 }\n";
265 
266 static const char shar_decode_z[31] =
267 "uudecode ${lock_dir}/uue && \\\n";
268 
269 static const char shar_touch_z[76] =
270 "  (set %02d %02d %02d %02d %02d %02d %02d %s\n\
271    eval \"${shar_touch}\") && \\\n";
272 
273 static const char show_all_status_z[44] =
274 "if %s\n\
275 then ${echo} %s\n\
276 else ${echo} %s%s\n\
277 fi\n";
278 
279 static const char show_bad_status_z[37] =
280 "if %s ; then :\n\
281 else ${echo} %s%s\n\
282 fi\n";
283 
284 static const char show_good_status_z[26] =
285 "if %s\n\
286 then ${echo} %s\n\
287 fi\n";
288 
289 static const char show_status_dies_z[13] =
290 "\n\
291      exit 1";
292 
293 static const char source_dir_comment_z[30] =
294 "# Source directory was '%s'.\n";
295 
296 static const char split_file_z[27] =
297 ": > ${lock_dir}/continued\n";
298 
299 static const char split_continue_quietly_z[40] =
300 "if test -f ${lock_dir}/continued; then\n";
301 
302 static const char split_continue_z[49] =
303 "if test ! -f ${lock_dir}/continued\n\
304 then ${echo} ";
305 
306 static const char split_resume_z[64] =
307 "  rm -f ${lock_dir}/continued\n\
308   sed 's/^%c//' << '%s' >> %s &&\n";
309 
310 static const char timestamp_z[652] =
311 "f=shar-touch.$$\n\
312 st1=200112312359.59\n\
313 st2=123123592001.59\n\
314 st2tr=123123592001.5 # old SysV 14-char limit\n\
315 st3=1231235901\n\n\
316 if   touch -am -t ${st1} ${f} >/dev/null 2>&1 && \\\n\
317      test ! -f ${st1} && test -f ${f}; then\n\
318   shar_touch='touch -am -t $1$2$3$4$5$6.$7 \"$8\"'\n\n\
319 elif touch -am ${st2} ${f} >/dev/null 2>&1 && \\\n\
320      test ! -f ${st2} && test ! -f ${st2tr} && test -f ${f}; then\n\
321   shar_touch='touch -am $3$4$5$6$1$2.$7 \"$8\"'\n\n\
322 elif touch -am ${st3} ${f} >/dev/null 2>&1 && \\\n\
323      test ! -f ${st3} && test -f ${f}; then\n\
324   shar_touch='touch -am $3$4$5$6$2 \"$8\"'\n\n\
325 else\n\
326   shar_touch=:\n\
327   echo\n\
328   ${echo} %s\n\
329   echo\n\
330 fi\n\
331 rm -f ${st1} ${st2} ${st2tr} ${st3} ${f}\n\
332 #\n";
333 
334 #define SHAR_MSG_CT  49
335 
336 static char const * shar_msg_table[SHAR_MSG_CT] = {
337   "Note: not verifying md5sums.  Consider installing GNU coreutils.",
338   "WARNING: not restoring timestamps.  Consider getting and\n\
339 installing GNU 'touch', distributed in GNU coreutils...",
340   "lock directory %s exists",
341   "failed to create %s lock directory",
342   "x - created lock directory %s.",
343   "x - failed to create lock directory %s.",
344   "x - created directory %s.",
345   "x - failed to create directory %s.",
346   "yes",
347   "overwrite this file",
348   "no",
349   "skip this file",
350   "all",
351   "overwrite all files",
352   "none",
353   "overwrite no files",
354   "help",
355   "explain choices",
356   "quit",
357   "exit immediately",
358   "restore of %s failed",
359   "  chmod %04o %s\n",
360   "End of part %d, continue with part %d",
361   "End of %s part %d",
362   "restoration warning:  size of %s is not %s",
363   "(text)",
364   "(compressed)",
365   "(gzipped)",
366   "(bzipped)",
367   "(binary)",
368   "archive",
369   "File %s is continued in part %d",
370   "Please unpack part 1 first!",
371   "Please unpack part ${shar_sequence} next!",
372   "x - STILL SKIPPING %s",
373   "continuing file %s",
374   "(empty)",
375   "x - overwriting %s",
376   "overwrite %s",
377   "SKIPPING %s",
378   "extraction aborted",
379   "x - SKIPPING %s (file already exists)",
380   "x - extracting %s %s",
381   "File %s is complete",
382   "uudecoding file %s",
383   "MD5 check failed",
384   "You have unpacked the last part",
385   "x - removed lock directory %s.",
386   "x - failed to remove lock directory %s."
387 };
388 
389 #define SM_not_verifying_sums   shar_msg_table[  0]
390 #define SM_time_not_set         shar_msg_table[  1]
391 #define SM_lock_dir_exists      shar_msg_table[  2]
392 #define SM_no_lock_dir          shar_msg_table[  3]
393 #define SM_x_lock_dir_created   shar_msg_table[  4]
394 #define SM_x_no_lock_dir        shar_msg_table[  5]
395 #define SM_x_dir_created        shar_msg_table[  6]
396 #define SM_x_no_dir             shar_msg_table[  7]
397 #define SM_ans_yes              shar_msg_table[  8]
398 #define SM_yes_means            shar_msg_table[  9]
399 #define SM_ans_no               shar_msg_table[ 10]
400 #define SM_no_means             shar_msg_table[ 11]
401 #define SM_ans_all              shar_msg_table[ 12]
402 #define SM_all_means            shar_msg_table[ 13]
403 #define SM_ans_none             shar_msg_table[ 14]
404 #define SM_none_means           shar_msg_table[ 15]
405 #define SM_ans_help             shar_msg_table[ 16]
406 #define SM_help_means           shar_msg_table[ 17]
407 #define SM_ans_quit             shar_msg_table[ 18]
408 #define SM_quit_means           shar_msg_table[ 19]
409 #define SM_restore_failed       shar_msg_table[ 20]
410 #define SM_restore_mode         shar_msg_table[ 21]
411 #define SM_end_of_part          shar_msg_table[ 22]
412 #define SM_s_end_of_part        shar_msg_table[ 23]
413 #define SM_bad_size             shar_msg_table[ 24]
414 #define SM_type_text            shar_msg_table[ 25]
415 #define SM_type_compressed      shar_msg_table[ 26]
416 #define SM_type_gzip            shar_msg_table[ 27]
417 #define SM_type_bzip            shar_msg_table[ 28]
418 #define SM_type_binary          shar_msg_table[ 29]
419 #define SM_word_archive         shar_msg_table[ 30]
420 #define SM_contin_in_part       shar_msg_table[ 31]
421 #define SM_unpack_part_1        shar_msg_table[ 32]
422 #define SM_unpack_next_part     shar_msg_table[ 33]
423 #define SM_still_skipping       shar_msg_table[ 34]
424 #define SM_continuing           shar_msg_table[ 35]
425 #define SM_is_empty             shar_msg_table[ 36]
426 #define SM_overwriting          shar_msg_table[ 37]
427 #define SM_overwrite            shar_msg_table[ 38]
428 #define SM_skipping             shar_msg_table[ 39]
429 #define SM_extract_aborted      shar_msg_table[ 40]
430 #define SM_skip_exist           shar_msg_table[ 41]
431 #define SM_x_extracting         shar_msg_table[ 42]
432 #define SM_file_complete        shar_msg_table[ 43]
433 #define SM_uudec_file           shar_msg_table[ 44]
434 #define SM_md5_check_failed     shar_msg_table[ 45]
435 #define SM_you_are_done         shar_msg_table[ 46]
436 #define SM_x_rem_lock_dir       shar_msg_table[ 47]
437 #define SM_x_no_rem_lock_dir    shar_msg_table[ 48]
438 
439 
440 #ifdef TRANSLATION_EXTRACTION
translation_strings(void)441 static void translation_strings (void) {
442   /* TRANSLATORS:  This is a phony function generated for the purpose of
443      constructing the strings to be extracted for translation.  Each string
444      is associated with a name (e.g. SM_ans_yes) that can be found in shar.c,
445      if you need to look up context.  These strings are all inserted into
446      the shar-generated shell script so the shar user can create shar archives
447      with messages localized for one locale.
448    */
449 SM_not_verifying_sums   = N_("Note: not verifying md5sums.  Consider installing GNU coreutils.");
450 SM_time_not_set         = N_("WARNING: not restoring timestamps.  Consider getting and\n\
451 installing GNU 'touch', distributed in GNU coreutils...");
452 SM_lock_dir_exists      = N_("lock directory %s exists");
453 SM_no_lock_dir          = N_("failed to create %s lock directory");
454 SM_x_lock_dir_created   = N_("x - created lock directory %s.");
455 SM_x_no_lock_dir        = N_("x - failed to create lock directory %s.");
456 SM_x_dir_created        = N_("x - created directory %s.");
457 SM_x_no_dir             = N_("x - failed to create directory %s.");
458 SM_ans_yes              = N_("yes");
459 SM_yes_means            = N_("overwrite this file");
460 SM_ans_no               = N_("no");
461 SM_no_means             = N_("skip this file");
462 SM_ans_all              = N_("all");
463 SM_all_means            = N_("overwrite all files");
464 SM_ans_none             = N_("none");
465 SM_none_means           = N_("overwrite no files");
466 SM_ans_help             = N_("help");
467 SM_help_means           = N_("explain choices");
468 SM_ans_quit             = N_("quit");
469 SM_quit_means           = N_("exit immediately");
470 SM_restore_failed       = N_("restore of %s failed");
471 SM_restore_mode         = N_("  chmod %04o %s\n");
472 SM_end_of_part          = N_("End of part %d, continue with part %d");
473 SM_s_end_of_part        = N_("End of %s part %d");
474 SM_bad_size             = N_("restoration warning:  size of %s is not %s");
475 SM_type_text            = N_("(text)");
476 SM_type_compressed      = N_("(compressed)");
477 SM_type_gzip            = N_("(gzipped)");
478 SM_type_bzip            = N_("(bzipped)");
479 SM_type_binary          = N_("(binary)");
480 SM_word_archive         = N_("archive");
481 SM_contin_in_part       = N_("File %s is continued in part %d");
482 SM_unpack_part_1        = N_("Please unpack part 1 first!");
483 SM_unpack_next_part     = N_("Please unpack part ${shar_sequence} next!");
484 SM_still_skipping       = N_("x - STILL SKIPPING %s");
485 SM_continuing           = N_("continuing file %s");
486 SM_is_empty             = N_("(empty)");
487 SM_overwriting          = N_("x - overwriting %s");
488 SM_overwrite            = N_("overwrite %s");
489 SM_skipping             = N_("SKIPPING %s");
490 SM_extract_aborted      = N_("extraction aborted");
491 SM_skip_exist           = N_("x - SKIPPING %s (file already exists)");
492 SM_x_extracting         = N_("x - extracting %s %s");
493 SM_file_complete        = N_("File %s is complete");
494 SM_uudec_file           = N_("uudecoding file %s");
495 SM_md5_check_failed     = N_("MD5 check failed");
496 SM_you_are_done         = N_("You have unpacked the last part");
497 SM_x_rem_lock_dir       = N_("x - removed lock directory %s.");
498 SM_x_no_rem_lock_dir    = N_("x - failed to remove lock directory %s.");
499 }
500 #endif /* TRANSLATION_EXTRACTION */
501 
502 static size_t const shar_msg_size[SHAR_MSG_CT] = {
503   64,  112, 24,  34,  30,  39,  25,  34,  3,   19,  2,   14,  3,   19,  4,
504   18,  4,   15,  4,   16,  20,  16,  37,  17,  42,  6,   12,  9,   9,   8,
505   7,   31,  27,  41,  21,  18,  7,   18,  12,  11,  18,  37,  20,  19,  18,
506   16,  31,  30,  39 };
507 
508 
509 typedef enum {
510   XFORM_PLAIN,
511   XFORM_APOSTROPHE,
512   XFORM_DBL_QUOTE
513 } msg_xform_t;
514 
515 static msg_xform_t shar_msg_xform[SHAR_MSG_CT] = {
516   XFORM_PLAIN,      XFORM_APOSTROPHE, XFORM_DBL_QUOTE,  XFORM_DBL_QUOTE,
517   XFORM_DBL_QUOTE,  XFORM_DBL_QUOTE,  XFORM_DBL_QUOTE,  XFORM_DBL_QUOTE,
518   XFORM_PLAIN,      XFORM_PLAIN,      XFORM_PLAIN,      XFORM_PLAIN,
519   XFORM_PLAIN,      XFORM_PLAIN,      XFORM_PLAIN,      XFORM_PLAIN,
520   XFORM_PLAIN,      XFORM_PLAIN,      XFORM_PLAIN,      XFORM_PLAIN,
521   XFORM_DBL_QUOTE,  XFORM_PLAIN,      XFORM_DBL_QUOTE,  XFORM_PLAIN,
522   XFORM_DBL_QUOTE,  XFORM_PLAIN,      XFORM_PLAIN,      XFORM_PLAIN,
523   XFORM_PLAIN,      XFORM_PLAIN,      XFORM_PLAIN,      XFORM_PLAIN,
524   XFORM_PLAIN,      XFORM_DBL_QUOTE,  XFORM_DBL_QUOTE,  XFORM_DBL_QUOTE,
525   XFORM_PLAIN,      XFORM_DBL_QUOTE,  XFORM_PLAIN,      XFORM_DBL_QUOTE,
526   XFORM_PLAIN,      XFORM_DBL_QUOTE,  XFORM_DBL_QUOTE,  XFORM_DBL_QUOTE,
527   XFORM_DBL_QUOTE,  XFORM_PLAIN,      XFORM_PLAIN,      XFORM_DBL_QUOTE,
528   XFORM_DBL_QUOTE };
529 
530 #endif /* SHAR_SCRIPTS_X_GUARD */
531 /*
532  * Local Variables:
533  * mode: C
534  * c-file-style: "gnu"
535  * indent-tabs-mode: nil
536  * End:
537  * end of scripts.x */
538