ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/App-Staticperl/staticperl.sh
Revision: 1.60
Committed: Fri Jul 31 09:36:54 2015 UTC (11 years, 1 month ago) by root
Content type: application/x-sh
Branch: MAIN
Changes since 1.59: +7 -5 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 #!/bin/sh
2    
3     #############################################################################
4 root 1.45 # configuration to fill in (or to replace in your .staticperlrc)
5 root 1.1
6     STATICPERL=~/.staticperl
7 root 1.14 CPAN=http://mirror.netcologne.de/cpan # which mirror to use
8 root 1.1 EMAIL="read the documentation <rtfm@example.org>"
9 root 1.45 DLCACHE=
10 root 1.1
11     # perl build variables
12 root 1.21 MAKE=make
13 root 1.60 PERL_DIST=perl
14     PERL_VERSION=5.22.0 # 5.12.4 and 5.8.9 are good choices for small builds
15 root 1.19 PERL_CC=cc
16 root 1.4 PERL_CONFIGURE="" # additional Configure arguments
17 root 1.32 PERL_CCFLAGS="-g -DPERL_DISABLE_PMC -DPERL_ARENA_SIZE=16376 -DNO_PERL_MALLOC_ENV -D_GNU_SOURCE -DNDEBUG"
18 root 1.51 PERL_OPTIMIZE="-Os" # -Os -ffunction-sections -fdata-sections -finline-limit=8 -ffast-math"
19 root 1.1
20     ARCH="$(uname -m)"
21    
22 root 1.51 #case "$ARCH" in
23     # i*86 | x86_64 | amd64 )
24     # PERL_OPTIMIZE="$PERL_OPTIMIZE -mpush-args -mno-inline-stringops-dynamically -mno-align-stringops -mno-ieee-fp" # x86/amd64
25     # case "$ARCH" in
26     # i*86 )
27     # PERL_OPTIMIZE="$PERL_OPTIMIZE -fomit-frame-pointer -march=pentium3 -mtune=i386" # x86 only
28     # ;;
29     # esac
30     # ;;
31     #esac
32 root 1.1
33     # -Wl,--gc-sections makes it impossible to check for undefined references
34     # for some reason so we need to patch away the "-no" after Configure and before make :/
35 root 1.16 # --allow-multiple-definition exists to work around uclibc's pthread static linking bug
36 root 1.37 #PERL_LDFLAGS="-Wl,--no-gc-sections -Wl,--allow-multiple-definition"
37     PERL_LDFLAGS=
38 root 1.1 PERL_LIBS="-lm -lcrypt" # perl loves to add lotsa crap itself
39    
40     # some configuration options for modules
41 root 1.24 PERL_MM_USE_DEFAULT=1
42 root 1.39 PERL_MM_OPT="MAN1PODS= MAN3PODS="
43 root 1.24 #CORO_INTERFACE=p # needed without nptl on x86, due to bugs in linuxthreads - very slow
44 root 1.47 #EV_EXTRA_DEFS='-DEV_FEATURES=4+8+16+64 -DEV_USE_SELECT=0 -DEV_USE_POLL=1 -DEV_USE_EPOLL=1 -DEV_NO_LOOPS -DEV_COMPAT3=0'
45     export PERL_MM_USE_DEFAULT PERL_MM_OPT
46 root 1.1
47     # which extra modules to install by default from CPAN that are
48     # required by mkbundle
49 root 1.58 STATICPERL_MODULES="ExtUtils::MakeMaker ExtUtils::CBuilder common::sense Pod::Strip PPI PPI::XS Pod::Usage"
50 root 1.2
51     # which extra modules you might want to install
52     EXTRA_MODULES=""
53 root 1.1
54     # overridable functions
55 root 1.7 preconfigure() { : ; }
56 root 1.37 patchconfig() { : ; }
57 root 1.1 postconfigure() { : ; }
58     postbuild() { : ; }
59     postinstall() { : ; }
60    
61     # now source user config, if any
62 root 1.14 if [ "$STATICPERLRC" ]; then
63     . "$STATICPERLRC"
64     else
65     [ -r /etc/staticperlrc ] && . /etc/staticperlrc
66     [ -r ~/.staticperlrc ] && . ~/.staticperlrc
67     [ -r "$STATICPERL/rc" ] && . "$STATICPERL/rc"
68     fi
69 root 1.1
70     #############################################################################
71     # support
72    
73 root 1.58 # work around ExtUtils::CBuilder and others
74     export CC="$PERL_CC"
75     export CFLAGS="$PERL_CFLASGS"
76     export LD="$PERL_CC"
77     export LDFLAGS="$PERL_LDFLAGS"
78     unset LIBS
79    
80 root 1.14 PERL_PREFIX="${PERL_PREFIX:=$STATICPERL/perl}" # where the perl gets installed
81    
82 root 1.38 unset PERL5OPT PERL5LIB PERLLIB PERL_UNICODE PERLIO_DEBUG
83 root 1.39 unset PERL_MB_OPT
84 root 1.24 LC_ALL=C; export LC_ALL # just to be on the safe side
85 root 1.12
86 root 1.38 # prepend PATH - not required by staticperl itself, but might make
87     # life easier when working in e.g. "staticperl cpan / look"
88     PATH="$PERL_PREFIX/perl/bin:$PATH"
89    
90 root 1.1 # set version in a way that Makefile.PL can extract
91     VERSION=VERSION; eval \
92 root 1.58 $VERSION="1.44"
93 root 1.1
94     BZ2=bz2
95     BZIP2=bzip2
96    
97     fatal() {
98     printf -- "\nFATAL: %s\n\n" "$*" >&2
99     exit 1
100     }
101    
102     verbose() {
103     printf -- "%s\n" "$*"
104     }
105    
106     verblock() {
107     verbose
108     verbose "***"
109     while read line; do
110     verbose "*** $line"
111     done
112     verbose "***"
113     verbose
114     }
115    
116     rcd() {
117     cd "$1" || fatal "$1: cannot enter"
118     }
119    
120     trace() {
121     prefix="$1"; shift
122     # "$@" 2>&1 | while read line; do
123     # echo "$prefix: $line"
124     # done
125     "$@"
126     }
127    
128     trap wait 0
129    
130     #############################################################################
131     # clean
132    
133     distclean() {
134     verblock <<EOF
135 root 1.14 deleting everything installed by this script (rm -rf $STATICPERL)
136 root 1.1 EOF
137    
138     rm -rf "$STATICPERL"
139     }
140    
141     #############################################################################
142     # download/configure/compile/install perl
143    
144     clean() {
145 root 1.48 rm -rf "$STATICPERL/src"
146 root 1.1 }
147    
148 root 1.23 realclean() {
149     rm -f "$PERL_PREFIX/staticstamp.postinstall"
150     rm -f "$PERL_PREFIX/staticstamp.install"
151 root 1.60 rm -f "$STATICPERL/src/$PERL_DIST-"*"/staticstamp.configure"
152 root 1.23 }
153    
154 root 1.1 fetch() {
155     rcd "$STATICPERL"
156    
157     mkdir -p src
158     rcd src
159    
160 root 1.6 if ! [ -d "perl-$PERL_VERSION" ]; then
161 root 1.60 PERLTAR=$PERL_DIST-$PERL_VERSION.tar.$BZ2
162 root 1.1
163 root 1.45 if ! [ -e $PERLTAR ]; then
164     URL="$CPAN/src/5.0/$PERLTAR"
165 root 1.60 [ "$PERL_URL" ] && URL="$PERL_URL"
166 root 1.1
167     verblock <<EOF
168     downloading perl
169     to manually download perl yourself, place
170 root 1.6 perl-$PERL_VERSION.tar.$BZ2 in $STATICPERL
171 root 1.1 trying $URL
172 root 1.42
173     either curl or wget is required for automatic download.
174     curl is tried first, then wget.
175 root 1.45
176     you can configure a download cache directory via DLCACHE
177     in your .staticperlrc to avoid repeated downloads.
178 root 1.1 EOF
179    
180 root 1.45 rm -f $PERLTAR~ # just to be on the safe side
181 root 1.48 { [ "$DLCACHE" ] && cp "$DLCACHE"/$PERLTAR $PERLTAR~ >/dev/null 2>&1; } \
182 root 1.45 || wget -O $PERLTAR~ "$URL" \
183     || curl -f >$PERLTAR~ "$URL" \
184 root 1.5 || fatal "$URL: unable to download"
185 root 1.45 rm -f $PERLTAR
186     mv $PERLTAR~ $PERLTAR
187     if [ "$DLCACHE" ]; then
188     mkdir -p "$DLCACHE"
189 root 1.57 cp $PERLTAR "$DLCACHE"/$PERLTAR~$$~ && \
190     mv "$DLCACHE"/$PERLTAR~$$~ "$DLCACHE"/$PERLTAR
191 root 1.45 fi
192 root 1.1 fi
193    
194     verblock <<EOF
195     unpacking perl
196     EOF
197    
198     mkdir -p unpack
199 root 1.20 rm -rf unpack/perl-$PERL_VERSION
200 root 1.45 $BZIP2 -d <$PERLTAR | ( cd unpack && tar xf - ) \
201     || fatal "$PERLTAR: error during unpacking"
202 root 1.60 chmod -R u+w unpack/$PERL_DIST-$PERL_VERSION
203     mv unpack/$PERL_DIST-$PERL_VERSION perl-$PERL_VERSION
204 root 1.1 rmdir -p unpack
205     fi
206     }
207    
208     # similar to GNU-sed -i or perl -pi
209     sedreplace() {
210     sed -e "$1" <"$2" > "$2~" || fatal "error while running sed"
211 root 1.20 rm -f "$2"
212 root 1.1 mv "$2~" "$2"
213     }
214    
215 root 1.22 configure_failure() {
216     cat <<EOF
217    
218    
219     ***
220     *** Configure failed - see above for the exact error message(s).
221     ***
222     *** Most commonly, this is because the default PERL_CCFLAGS or PERL_OPTIMIZE
223     *** flags are not supported by your compiler. Less often, this is because
224     *** PERL_LIBS either contains a library not available on your system (such as
225     *** -lcrypt), or because it lacks a required library (e.g. -lsocket or -lnsl).
226     ***
227     *** You can provide your own flags by creating a ~/.staticperlrc file with
228     *** variable assignments. For example (these are the actual values used):
229     ***
230    
231     PERL_CC="$PERL_CC"
232     PERL_CCFLAGS="$PERL_CCFLAGS"
233     PERL_OPTIMIZE="$PERL_OPTIMIZE"
234     PERL_LDFLAGS="$PERL_LDFLAGS"
235     PERL_LIBS="$PERL_LIBS"
236    
237     EOF
238     exit 1
239     }
240    
241 root 1.1 configure() {
242     fetch
243    
244 root 1.6 rcd "$STATICPERL/src/perl-$PERL_VERSION"
245 root 1.1
246     [ -e staticstamp.configure ] && return
247    
248     verblock <<EOF
249 root 1.6 configuring $STATICPERL/src/perl-$PERL_VERSION
250 root 1.1 EOF
251    
252 root 1.8 rm -f "$PERL_PREFIX/staticstamp.install"
253 root 1.1
254 root 1.21 "$MAKE" distclean >/dev/null 2>&1
255 root 1.1
256 root 1.23 sedreplace '/^#define SITELIB/d' config_h.SH
257    
258     # I hate them for this
259 root 1.1 grep -q -- -fstack-protector Configure && \
260     sedreplace 's/-fstack-protector/-fno-stack-protector/g' Configure
261    
262 root 1.37 # what did that bloke think
263     grep -q -- usedl=.define hints/darwin.sh && \
264     sedreplace '/^usedl=.define.;$/d' hints/darwin.sh
265    
266     preconfigure || fatal "preconfigure hook failed"
267 root 1.7
268 root 1.1 # trace configure \
269     sh Configure -Duselargefiles \
270     -Uuse64bitint \
271     -Dusemymalloc=n \
272     -Uusedl \
273     -Uusethreads \
274     -Uuseithreads \
275     -Uusemultiplicity \
276     -Uusesfio \
277     -Uuseshrplib \
278 root 1.26 -Uinstallusrbinperl \
279 root 1.22 -A ccflags=" $PERL_CCFLAGS" \
280 root 1.19 -Dcc="$PERL_CC" \
281 root 1.1 -Doptimize="$PERL_OPTIMIZE" \
282     -Dldflags="$PERL_LDFLAGS" \
283     -Dlibs="$PERL_LIBS" \
284 root 1.6 -Dprefix="$PERL_PREFIX" \
285     -Dbin="$PERL_PREFIX/bin" \
286     -Dprivlib="$PERL_PREFIX/lib" \
287     -Darchlib="$PERL_PREFIX/lib" \
288 root 1.1 -Uusevendorprefix \
289 root 1.6 -Dsitelib="$PERL_PREFIX/lib" \
290     -Dsitearch="$PERL_PREFIX/lib" \
291 root 1.1 -Uman1dir \
292     -Uman3dir \
293     -Usiteman1dir \
294     -Usiteman3dir \
295     -Dpager=/usr/bin/less \
296     -Demail="$EMAIL" \
297     -Dcf_email="$EMAIL" \
298     -Dcf_by="$EMAIL" \
299 root 1.4 $PERL_CONFIGURE \
300 root 1.19 -Duseperlio \
301 root 1.22 -dE || configure_failure
302 root 1.1
303     sedreplace '
304     s/-Wl,--no-gc-sections/-Wl,--gc-sections/g
305     s/ *-fno-stack-protector */ /g
306     ' config.sh
307    
308 root 1.37 patchconfig || fatal "patchconfig hook failed"
309    
310 root 1.1 sh Configure -S || fatal "Configure -S failed"
311    
312     postconfigure || fatal "postconfigure hook failed"
313    
314 root 1.48 : > staticstamp.configure
315 root 1.1 }
316    
317 root 1.39 write_shellscript() {
318     {
319     echo "#!/bin/sh"
320     echo "STATICPERL=\"$STATICPERL\""
321     echo "PERL_PREFIX=\"$PERL_PREFIX\""
322     echo "MAKE=\"$MAKE\""
323     cat
324     } >"$PERL_PREFIX/bin/$1"
325     chmod 755 "$PERL_PREFIX/bin/$1"
326     }
327    
328 root 1.1 build() {
329     configure
330    
331 root 1.6 rcd "$STATICPERL/src/perl-$PERL_VERSION"
332 root 1.1
333     verblock <<EOF
334 root 1.6 building $STATICPERL/src/perl-$PERL_VERSION
335 root 1.1 EOF
336    
337 root 1.6 rm -f "$PERL_PREFIX/staticstamp.install"
338 root 1.1
339 root 1.21 "$MAKE" || fatal "make: error while building perl"
340 root 1.1
341     postbuild || fatal "postbuild hook failed"
342     }
343    
344 root 1.48 _postinstall() {
345     if ! [ -e "$PERL_PREFIX/staticstamp.postinstall" ]; then
346     NOCHECK_INSTALL=+
347     instcpan $STATICPERL_MODULES
348 root 1.56 [ "$EXTRA_MODULES" ] && instcpan $EXTRA_MODULES
349 root 1.48
350     postinstall || fatal "postinstall hook failed"
351    
352     : > "$PERL_PREFIX/staticstamp.postinstall"
353     fi
354     }
355    
356 root 1.1 install() {
357 root 1.9 if ! [ -e "$PERL_PREFIX/staticstamp.install" ]; then
358     build
359 root 1.1
360 root 1.9 verblock <<EOF
361 root 1.6 installing $STATICPERL/src/perl-$PERL_VERSION
362     to $PERL_PREFIX
363 root 1.1 EOF
364    
365 root 1.14 ln -sf "perl/bin/" "$STATICPERL/bin"
366     ln -sf "perl/lib/" "$STATICPERL/lib"
367    
368 root 1.39 mkdir "$STATICPERL/patched"
369    
370 root 1.14 ln -sf "$PERL_PREFIX" "$STATICPERL/perl" # might get overwritten
371     rm -rf "$PERL_PREFIX" # by this rm -rf
372    
373 root 1.21 "$MAKE" install || fatal "make install: error while installing"
374 root 1.1
375 root 1.9 rcd "$PERL_PREFIX"
376 root 1.2
377 root 1.9 # create a "make install" replacement for CPAN
378 root 1.39 write_shellscript SP-make-install-make <<'EOF'
379     #CAT make-install-make.sh
380     EOF
381 root 1.10
382 root 1.39 # create a "patch modules" helper
383     write_shellscript SP-patch-postinstall <<'EOF'
384     #CAT patch-postinstall.sh
385     EOF
386 root 1.10
387 root 1.58 # immediately use it
388 root 1.39 "$PERL_PREFIX/bin/SP-patch-postinstall"
389 root 1.9
390 root 1.39 # help to trick CPAN into avoiding ~/.cpan completely
391 root 1.9 echo 1 >"$PERL_PREFIX/lib/CPAN/MyConfig.pm"
392 root 1.1
393 root 1.39 # we call cpan with -MCPAN::MyConfig in this script, which
394     # is strictly unnecssary as we have to patch CPAN anyway,
395     # so consider it "for good measure".
396 root 1.36 "$PERL_PREFIX"/bin/perl -MCPAN::MyConfig -MCPAN -e '
397 root 1.9 CPAN::Shell->o (conf => urllist => push => "'"$CPAN"'");
398     CPAN::Shell->o (conf => q<cpan_home>, "'"$STATICPERL"'/cpan");
399     CPAN::Shell->o (conf => q<init>);
400     CPAN::Shell->o (conf => q<cpan_home>, "'"$STATICPERL"'/cpan");
401     CPAN::Shell->o (conf => q<build_dir>, "'"$STATICPERL"'/cpan/build");
402     CPAN::Shell->o (conf => q<prefs_dir>, "'"$STATICPERL"'/cpan/prefs");
403     CPAN::Shell->o (conf => q<histfile> , "'"$STATICPERL"'/cpan/histfile");
404     CPAN::Shell->o (conf => q<keep_source_where>, "'"$STATICPERL"'/cpan/sources");
405 root 1.59 CPAN::Shell->o (conf => q<makepl_arg>, "MAP_TARGET=perl");
406 root 1.39 CPAN::Shell->o (conf => q<make_install_make_command>, "'"$PERL_PREFIX"'/bin/SP-make-install-make");
407 root 1.9 CPAN::Shell->o (conf => q<prerequisites_policy>, q<follow>);
408 root 1.57 CPAN::Shell->o (conf => q<build_requires_install_policy>, q<yes>);
409 root 1.36 CPAN::Shell->o (conf => q<prefer_installer>, "EUMM");
410 root 1.9 CPAN::Shell->o (conf => q<commit>);
411     ' || fatal "error while initialising CPAN"
412 root 1.2
413 root 1.48 : > "$PERL_PREFIX/staticstamp.install"
414 root 1.9 fi
415    
416 root 1.48 _postinstall
417     }
418    
419     import() {
420     IMPORT="$1"
421    
422     rcd "$STATICPERL"
423    
424     if ! [ -e "$PERL_PREFIX/staticstamp.install" ]; then
425     verblock <<EOF
426     import perl from $IMPORT to $STATICPERL
427     EOF
428 root 1.1
429 root 1.48 rm -rf bin cpan lib patched perl src
430     mkdir -m 755 perl perl/bin
431     ln -s perl/bin/ bin
432     ln -s "$IMPORT" perl/bin/
433 root 1.1
434 root 1.51 echo "$IMPORT" > "$PERL_PREFIX/.import"
435    
436 root 1.48 : > "$PERL_PREFIX/staticstamp.install"
437 root 1.9 fi
438 root 1.48
439     _postinstall
440 root 1.1 }
441    
442     #############################################################################
443     # install a module from CPAN
444    
445     instcpan() {
446     [ $NOCHECK_INSTALL ] || install
447    
448     verblock <<EOF
449     installing modules from CPAN
450     $@
451     EOF
452    
453 root 1.51 MYCONFIG=
454     [ -e "$PERL_PREFIX/.import" ] || MYCONFIG=-MCPAN::MyConfig
455    
456     "$PERL_PREFIX"/bin/perl $MYCONFIG -MCPAN -e 'notest (install => $_) for @ARGV' -- "$@" | tee "$STATICPERL/instcpan.log"
457 root 1.48
458     if grep -q " -- NOT OK\$" "$STATICPERL/instcpan.log"; then
459     fatal "failure while installing modules from CPAN ($@)"
460     fi
461     rm -f "$STATICPERL/instcpan.log"
462 root 1.1 }
463    
464     #############################################################################
465     # install a module from unpacked sources
466    
467     instsrc() {
468     [ $NOCHECK_INSTALL ] || install
469    
470     verblock <<EOF
471     installing modules from source
472     $@
473     EOF
474    
475     for mod in "$@"; do
476     echo
477     echo $mod
478     (
479     rcd $mod
480 root 1.21 "$MAKE" -f Makefile.aperl map_clean >/dev/null 2>&1
481     "$MAKE" distclean >/dev/null 2>&1
482 root 1.6 "$PERL_PREFIX"/bin/perl Makefile.PL || fatal "$mod: error running Makefile.PL"
483 root 1.21 "$MAKE" || fatal "$mod: error building module"
484 root 1.39 "$PERL_PREFIX"/bin/SP-make-install-make install || fatal "$mod: error installing module"
485 root 1.21 "$MAKE" distclean >/dev/null 2>&1
486 root 1.1 exit 0
487     ) || exit $?
488     done
489     }
490    
491     #############################################################################
492     # main
493    
494     podusage() {
495     echo
496 root 1.17
497 root 1.6 if [ -e "$PERL_PREFIX/bin/perl" ]; then
498     "$PERL_PREFIX/bin/perl" -MPod::Usage -e \
499 root 1.1 'pod2usage -input => *STDIN, -output => *STDOUT, -verbose => '$1', -exitval => 0, -noperldoc => 1' <"$0" \
500     2>/dev/null && exit
501     fi
502 root 1.17
503 root 1.1 # try whatever perl we can find
504     perl -MPod::Usage -e \
505     'pod2usage -input => *STDIN, -output => *STDOUT, -verbose => '$1', -exitval => 0, -noperldoc => 1' <"$0" \
506     2>/dev/null && exit
507    
508 root 1.17 fatal "displaying documentation requires a working perl - try '$0 install' to build one in a safe location"
509 root 1.1 }
510    
511     usage() {
512     podusage 0
513     }
514    
515     catmkbundle() {
516     {
517     read dummy
518 root 1.6 echo "#!$PERL_PREFIX/bin/perl"
519 root 1.1 cat
520     } <<'MKBUNDLE'
521     #CAT mkbundle
522     MKBUNDLE
523     }
524    
525     bundle() {
526 root 1.39 MKBUNDLE="${MKBUNDLE:=$PERL_PREFIX/bin/SP-mkbundle}"
527 root 1.1 catmkbundle >"$MKBUNDLE~" || fatal "$MKBUNDLE~: cannot create"
528     chmod 755 "$MKBUNDLE~" && mv "$MKBUNDLE~" "$MKBUNDLE"
529 root 1.12 CACHE="$STATICPERL/cache"
530     mkdir -p "$CACHE"
531     "$PERL_PREFIX/bin/perl" -- "$MKBUNDLE" --cache "$CACHE" "$@"
532 root 1.1 }
533    
534     if [ $# -gt 0 ]; then
535     while [ $# -gt 0 ]; do
536     mkdir -p "$STATICPERL" || fatal "$STATICPERL: cannot create"
537 root 1.6 mkdir -p "$PERL_PREFIX" || fatal "$PERL_PREFIX: cannot create"
538 root 1.1
539     command="${1#--}"; shift
540     case "$command" in
541 root 1.14 version )
542     echo "staticperl version $VERSION"
543     ;;
544 root 1.48 fetch | configure | build | install | clean | realclean | distclean )
545 root 1.22 ( "$command" ) || exit
546 root 1.1 ;;
547 root 1.48 import )
548     ( import "$1" ) || exit
549     shift
550     ;;
551 root 1.1 instsrc )
552 root 1.22 ( instsrc "$@" ) || exit
553 root 1.1 exit
554     ;;
555     instcpan )
556 root 1.22 ( instcpan "$@" ) || exit
557 root 1.1 exit
558     ;;
559 root 1.39 perl )
560     ( install ) || exit
561     exec "$PERL_PREFIX/bin/perl" "$@"
562     exit
563     ;;
564 root 1.1 cpan )
565 root 1.22 ( install ) || exit
566 root 1.48 PERL="$PERL_PREFIX/bin/perl"
567     export PERL
568 root 1.39 exec "$PERL_PREFIX/bin/cpan" "$@"
569 root 1.1 exit
570     ;;
571     mkbundle )
572 root 1.22 ( install ) || exit
573 root 1.40 bundle "$@"
574 root 1.1 exit
575     ;;
576     mkperl )
577 root 1.22 ( install ) || exit
578 root 1.40 bundle --perl "$@"
579 root 1.1 exit
580     ;;
581 root 1.11 mkapp )
582 root 1.22 ( install ) || exit
583 root 1.40 bundle --app "$@"
584 root 1.11 exit
585     ;;
586 root 1.1 help )
587     podusage 2
588     ;;
589     * )
590     exec 1>&2
591     echo
592     echo "Unknown command: $command"
593     podusage 0
594     ;;
595     esac
596     done
597     else
598     usage
599     fi
600    
601     exit 0
602    
603     #CAT staticperl.pod
604