summaryrefslogtreecommitdiff
path: root/src/scripts.x
blob: 91f7546659519103c837d9a525f9832a79ece668 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
/*  -*- buffer-read-only: t -*- vi: set ro:
 * 
 * DO NOT EDIT THIS FILE   (scripts.x)
 * 
 * It has been AutoGen-ed  Sunday July  1, 2007 at 04:54:14 AM PDT
 * From the definitions    scripts.def
 * and the template file   scripts.tpl
 *
 * shar is free software.
 * 
 * You may redistribute it and/or modify it under the terms of the
 * GNU General Public License, as published by the Free Software
 * Foundation; either version 2 of the License, or (at your option)
 * any later version.
 * 
 * shar is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with shar.  If not, write to:
 * 	The Free Software Foundation, Inc.,
 * 	51 Franklin Street, Fifth Floor
 * 	Boston, MA  02110-1301, USA.
 *
 *  This file defines the shell script strings in C format.
 *  The compiler will reconstruct the original string found in scripts.def.
 *  shar.c will emit these strings into the constructed shar archive.
 *  See "scripts.def" for rationale.
 */
#ifndef SHAR_SCRIPTS_X_GUARD
#define SHAR_SCRIPTS_X_GUARD 1

static const char contents_z[113] = 
#line 25 "scripts.def"
"#\n\
# This shar contains:\n\
# length mode       name\n\
# ------ ---------- ------------------------------------------\n";

static const char noisy_mkdir_z[46] = 
#line 36 "scripts.def"
"${echo} $echo_n 'x - %s: '$echo_c\n\
mkdir '%s'\n";

static const char continue_archive_z[167] = 
#line 45 "scripts.def"
"#!/bin/sh\n\
# This is `%s' (part %d of %s).\n\
# Do not concatenate these parts, unpack them in order with `/bin/sh'.\n\
# File `%s' is being continued...\n\
#\n\
lock_dir=_sh%05d\n";

static const char dev_tty_check_z[83] = 
#line 58 "scripts.def"
"if test -n \"`ls /dev/tty 2>/dev/null`\"\n\
then shar_tty=/dev/tty\n\
else shar_tty= ; fi\n";

static const char echo_checks_z[202] = 
#line 68 "scripts.def"
"if (echo \"testing\\c\"; echo 1,2,3) | grep c >/dev/null\n\
then if (echo -n test; echo 1,2,3) | grep n >/dev/null\n\
     then shar_n= shar_c='\n\
'\n\
     else shar_n=-n shar_c= ; fi\n\
else shar_n= shar_c='\\c' ; fi\n";

static const char echo_string_z[14] = 
#line 81 "scripts.def"
"${echo} '%s'\n";

static const char file_leader_z[218] = 
#line 89 "scripts.def"
"#!/bin/sh\n\
# This is %s%s archive (produced by GNU %s %s).\n\
# To extract the files from this archive, save it to some FILE, remove\n\
# everything before the `#!/bin/sh' line above, then type `sh FILE'.\n\
#\n\
lock_dir=_sh%05d\n";

static const char i18n_z[736] = 
#line 102 "scripts.def"
"save_IFS=\"${IFS}\"\n\
IFS=\"${IFS}:\"\n\
gettext_dir=FAILED\n\
locale_dir=FAILED\n\
first_param=\"$1\"\n\
for dir in $PATH\n\
do\n\
  if test \"$gettext_dir\" = FAILED && test -f $dir/gettext \\\n\
     && ($dir/gettext --version >/dev/null 2>&1)\n\
  then\n\
    case `$dir/gettext --version 2>&1 | sed 1q` in\n\
      *GNU*) gettext_dir=$dir ;;\n\
    esac\n\
  fi\n\
  if test \"$locale_dir\" = FAILED && test -f $dir/shar \\\n\
     && ($dir/shar --print-text-domain-dir >/dev/null 2>&1)\n\
  then\n\
    locale_dir=`$dir/shar --print-text-domain-dir`\n\
  fi\n\
done\n\
IFS=\"$save_IFS\"\n\
if test \"$locale_dir\" = FAILED || test \"$gettext_dir\" = FAILED\n\
then\n\
  echo=echo\n\
else\n\
  TEXTDOMAINDIR=$locale_dir\n\
  export TEXTDOMAINDIR\n\
  TEXTDOMAIN=sharutils\n\
  export TEXTDOMAIN\n\
  echo=\"$gettext_dir/gettext -s\"\n\
fi\n";

static const char lock_dir_z[52] = 
#line 140 "scripts.def"
"${echo} $shar_n 'x - %s' \"\\`${lock_dir}': \"$shar_c\n";

static const char md5check_z[165] = 
#line 148 "scripts.def"
"MD5SUM=${MD5SUM-md5sum}\n\
f=`${MD5SUM} --version | egrep '^md5sum .*(core|text)utils'`\n\
test -n \"${f}\" && md5check=true || md5check=false\n\
${md5check} || \\\n\
  echo '%s'\n";

static const char md5test_z[99] = 
#line 160 "scripts.def"
"  if ${md5check}\n\
  then (\n\
       ${MD5SUM} -c >/dev/null 2>&1 || ${echo} '%s: %s'\n\
       ) << \\%s\n";

static const char query_answers_z[769] = 
#line 171 "scripts.def"
"ans_yes='%s'    yes_means='%s'\n\
ans_no='%s'     no_means='%s'\n\
ans_all='%s'    all_means='%s'\n\
ans_none='%s'   none_means='%s'\n\
ans_help='%s'   help_means='%s'\n\
ans_quit='%s'   quit_means='%s'\n\
user_answers='no yes all none help quit'\n\
shar_wish='no'\n\
ans_list=\"\n\
[<${ans_no}>, ${ans_yes}, ${ans_all}, ${ans_none}, ${ans_help}, ${ans_quit}] ? \"\n\n\
eval_ans='\n\
if test -z \"${shar_wish}\" ; then answer=no ; else\n\
  answer='help'\n\
  case \"${ans_yes}\"  in \"${shar_wish}\"* ) answer=yes  ; break ;; esac\n\
  case \"${ans_no}\"   in \"${shar_wish}\"* ) answer=no   ; break ;; esac\n\
  case \"${ans_all}\"  in \"${shar_wish}\"* ) answer=all  ; break ;; esac\n\
  case \"${ans_none}\" in \"${shar_wish}\"* ) answer=none ; break ;; esac\n\
  case \"${ans_quit}\" in \"${shar_wish}\"* ) answer=quit ; break ;; esac\n\
fi'\n";

static const char query_check_z[246] = 
#line 197 "scripts.def"
"  case \"${shar_wish}\" in\n\
    quit) ${echo} '%s'; exit 1 ;;\n\
    none) ${echo} 'x - %s' ; shar_skip=yes ;;\n\
    no)   shar_skip=yes ;;\n\
    yes | all)  shar_skip=no  ;;\n\
  esac\n\
else\n\
  shar_skip=no\n\
fi\n\
if test $shar_skip = yes; then\n\
  ${echo} 'x - %s'\n";

static const char query_user_z[486] = 
#line 215 "scripts.def"
"  while : ; do\n\
    answer=${shar_wish}\n\
    case $shar_wish in\n\
      all) ${echo} 'x - %s' ; break ;;\n\
      none) break ;;\n\
      *) ${echo} $shar_n \"? - %s${ans_list}\"$shar_c\n\
         if test -n \"$shar_tty\"\n\
         then read shar_wish < $shar_tty\n\
         else read shar_wish\n\
         fi\n\
         eval \"${eval_ans}\" ;;\n\
    esac\n\
    shar_wish=help\n\
    for f in ${user_answers}\n\
    do eval printf \"'%%-9s %%s\\n'\" \\\"\\${ans_${f}}\\\" \\\"\\${${f}_means}\\\"\n\
    done\n\
  done\n\
  shar_wish=${answer}\n";

static const char seq_check_z[125] = 
#line 240 "scripts.def"
"if test ! -r ${lock_dir}/seq; then\n\
 ${echo} '%s'\n\
  exit 1\n\
fi\n\
shar_sequence=`cat ${lock_dir}/seq`\n\
test \"$shar_sequence\" = %d\n";

static const char timestamp_z[661] = 
#line 253 "scripts.def"
"f=shar-touch.$$\n\
st1=200112312359.59\n\
st2=123123592001.59\n\
st2tr=123123592001.5 # old SysV 14-char limit\n\
st3=1231235901\n\n\
if touch -am -t ${st1} ${f} >/dev/null 2>&1 && \\\n\
   test ! -f ${st1} && test -f ${f}; then\n\
  shar_touch='touch -am -t $1$2$3$4$5$6.$7 \"$8\"'\n\n\
elif touch -am ${st2} ${f} >/dev/null 2>&1 && \\\n\
   test ! -f ${st2} && test ! -f ${st2tr} && test -f ${f}; then\n\
  shar_touch='touch -am $3$4$5$6$1$2.$7 \"$8\"'\n\n\
elif touch -am ${st3} ${f} >/dev/null 2>&1 && \\\n\
   test ! -f ${st3} && test -f ${f}; then\n\
  shar_touch='touch -am $3$4$5$6$2 \"$8\"'\n\n\
else\n\
  shar_touch=:\n\
  echo\n\
  ${echo} '%s'\n\
  ${echo} '%s'\n\
  echo\n\
fi\n\
rm -f ${st1} ${st2} ${st2tr} ${st3} ${f}\n\
#\n";

#endif /* SHAR_SCRIPTS_X_GUARD */
/* end of scripts.x */