#!/bin/sh # This is a shell archive (produced by GNU sharutils 4.6.3). # To extract the files from this archive, save it to some FILE, remove # everything before the `#!/bin/sh' line above, then type `sh FILE'. # lock_dir=_sh18320 # Made on 2008-06-03 20:21 MDT by . # Source directory was `/home/pi/bin/norway'. # # Existing files will *not* be overwritten, unless `-c' is specified. # # This shar contains: # length mode name # ------ ---------- ------------------------------------------ # 747 -rwxr-xr-x norway2.rb # 773 -rwxr-xr-x norway3.rb # 460 -rwxr-xr-x norway4.rb # 277 -rwxr-xr-x norwayirc # 497 -rwxr-xr-x norway.rb # MD5SUM=${MD5SUM-md5sum} f=`${MD5SUM} --version | egrep '^md5sum .*(core|text)utils'` test -n "${f}" && md5check=true || md5check=false ${md5check} || \ echo 'Note: not verifying md5sums. Consider installing GNU coreutils.' save_IFS="${IFS}" IFS="${IFS}:" gettext_dir=FAILED locale_dir=FAILED first_param="$1" for dir in $PATH do if test "$gettext_dir" = FAILED && test -f $dir/gettext \ && ($dir/gettext --version >/dev/null 2>&1) then case `$dir/gettext --version 2>&1 | sed 1q` in *GNU*) gettext_dir=$dir ;; esac fi if test "$locale_dir" = FAILED && test -f $dir/shar \ && ($dir/shar --print-text-domain-dir >/dev/null 2>&1) then locale_dir=`$dir/shar --print-text-domain-dir` fi done IFS="$save_IFS" if test "$locale_dir" = FAILED || test "$gettext_dir" = FAILED then echo=echo else TEXTDOMAINDIR=$locale_dir export TEXTDOMAINDIR TEXTDOMAIN=sharutils export TEXTDOMAIN echo="$gettext_dir/gettext -s" fi if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null then if (echo -n test; echo 1,2,3) | grep n >/dev/null then shar_n= shar_c=' ' else shar_n=-n shar_c= ; fi else shar_n= shar_c='\c' ; fi f=shar-touch.$$ st1=200112312359.59 st2=123123592001.59 st2tr=123123592001.5 # old SysV 14-char limit st3=1231235901 if touch -am -t ${st1} ${f} >/dev/null 2>&1 && \ test ! -f ${st1} && test -f ${f}; then shar_touch='touch -am -t $1$2$3$4$5$6.$7 "$8"' elif touch -am ${st2} ${f} >/dev/null 2>&1 && \ test ! -f ${st2} && test ! -f ${st2tr} && test -f ${f}; then shar_touch='touch -am $3$4$5$6$1$2.$7 "$8"' elif touch -am ${st3} ${f} >/dev/null 2>&1 && \ test ! -f ${st3} && test -f ${f}; then shar_touch='touch -am $3$4$5$6$2 "$8"' else shar_touch=: echo ${echo} 'WARNING: not restoring timestamps. Consider getting and' ${echo} 'installing GNU `touch'\'', distributed in GNU coreutils...' echo fi rm -f ${st1} ${st2} ${st2tr} ${st3} ${f} # if test ! -d ${lock_dir} then : ; else ${echo} 'lock directory '${lock_dir}' exists' exit 1 fi if mkdir ${lock_dir} then ${echo} 'x - created lock directory `'${lock_dir}\''.' else ${echo} 'x - failed to create lock directory `'${lock_dir}\''.' exit 1 fi # ============= norway2.rb ============== if test -f 'norway2.rb' && test "$first_param" != -c; then ${echo} 'x -SKIPPING norway2.rb (file already exists)' else ${echo} 'x - extracting norway2.rb (text)' sed 's/^X//' << 'SHAR_EOF' > 'norway2.rb' && #!/usr/bin/ruby str = ARGV[0] || "NORWAY?" cnt = ARGV[1] || 7 X $tags = %w{b tt i s blink u big small u} X class String X def norwify X arr = self.split('') X $tags.each do |t| X arr.collect! do |e| X if e =~ /[[:space:]]/: e # Don't bother making a space any fancier X elsif rand(2) == 1: "<#{t}>#{e}" X else e X end X end X end X arr.collect! do |e| X if e =~ /[[:space:]]/: e X else X color = "#" X 3.times { color << "%.2x" % rand(0xFF) } X %Q[#{e}] X end X end X arr.join X end end X puts ("#{str} " * cnt.to_i).norwify SHAR_EOF (set 20 08 06 03 20 21 00 'norway2.rb'; eval "$shar_touch") && chmod 0755 'norway2.rb' if test $? -ne 0 then ${echo} 'restore of norway2.rb failed' fi if ${md5check} then ( ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'norway2.rb: MD5 check failed' ) << SHAR_EOF 6a1c1c85d3e0064dab7e302f910159ac norway2.rb SHAR_EOF else test `LC_ALL=C wc -c < 'norway2.rb'` -ne 747 && \ ${echo} 'restoration warning: size of norway2.rb is not 747' fi fi # ============= norway3.rb ============== if test -f 'norway3.rb' && test "$first_param" != -c; then ${echo} 'x -SKIPPING norway3.rb (file already exists)' else ${echo} 'x - extracting norway3.rb (text)' sed 's/^X//' << 'SHAR_EOF' > 'norway3.rb' && #!/usr/bin/ruby str = ARGV[0] || "NORWAY?" cnt = ARGV[1] || 7 X $tags = %w{b tt i s blink u u} X class String X def norwify X arr = self.split('') X $tags.each do |t| X arr.collect! do |e| X if e =~ /[[:space:]]/: e # Don't bother making a space any fancier X elsif rand(2) == 1: "<#{t}>#{e}" X else e X end X end X end X arr.collect! do |e| X if e =~ /[[:space:]]/: e X else X color = "#" X 3.times { color << "%.2x" % rand(0xFF) } X %Q[#{e}] X end X end X arr.join X end end X puts ("#{str} " * cnt.to_i).norwify SHAR_EOF (set 20 08 06 03 20 21 00 'norway3.rb'; eval "$shar_touch") && chmod 0755 'norway3.rb' if test $? -ne 0 then ${echo} 'restore of norway3.rb failed' fi if ${md5check} then ( ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'norway3.rb: MD5 check failed' ) << SHAR_EOF 94e77c4d97289d6692fc597af1dd44aa norway3.rb SHAR_EOF else test `LC_ALL=C wc -c < 'norway3.rb'` -ne 773 && \ ${echo} 'restoration warning: size of norway3.rb is not 773' fi fi # ============= norway4.rb ============== if test -f 'norway4.rb' && test "$first_param" != -c; then ${echo} 'x -SKIPPING norway4.rb (file already exists)' else ${echo} 'x - extracting norway4.rb (text)' sed 's/^X//' << 'SHAR_EOF' > 'norway4.rb' && #!/usr/bin/ruby str = ARGV[0] || "NORWAY?" cnt = ARGV[1] || 7 X $tags = %w{darkred red orange brown yellow green olive cyan blue darkblue indigo violet black} X class String X def norwify X arr = self.split('') X arr.collect! do |e| X if e =~ /[[:space:]]/: e X else X %Q![color=#{$tags[rand($tags.size)]}]#{e}[/color]! X end X end X arr.join X end end X puts ("#{str} " * cnt.to_i).norwify SHAR_EOF (set 20 08 06 03 20 21 00 'norway4.rb'; eval "$shar_touch") && chmod 0755 'norway4.rb' if test $? -ne 0 then ${echo} 'restore of norway4.rb failed' fi if ${md5check} then ( ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'norway4.rb: MD5 check failed' ) << SHAR_EOF dcba9a6080be3b2daec4d5fc8a6e2ec8 norway4.rb SHAR_EOF else test `LC_ALL=C wc -c < 'norway4.rb'` -ne 460 && \ ${echo} 'restoration warning: size of norway4.rb is not 460' fi fi # ============= norwayirc ============== if test -f 'norwayirc' && test "$first_param" != -c; then ${echo} 'x -SKIPPING norwayirc (file already exists)' else ${echo} 'x - extracting norwayirc (text)' sed 's/^X//' << 'SHAR_EOF' > 'norwayirc' && #!/usr/bin/ruby str = ARGV[0] || "NORWAY?" cnt = ARGV[1] || 7 def rn(l,h); rand(h)+l; end puts ("#{str} " * cnt.to_i).split('').collect { |e| rand(2)==1 ? "\003#{rn(1,14)},#{rn(1,14)}#{e}\003" : X "\003#{rn(1,14)}#{e}\003" }.collect {|e| rand(2)==1 ? "\002#{e}\002" : e }.join SHAR_EOF (set 20 08 06 03 20 21 00 'norwayirc'; eval "$shar_touch") && chmod 0755 'norwayirc' if test $? -ne 0 then ${echo} 'restore of norwayirc failed' fi if ${md5check} then ( ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'norwayirc: MD5 check failed' ) << SHAR_EOF e56e527ffc484bfc2f37d4f94970d92d norwayirc SHAR_EOF else test `LC_ALL=C wc -c < 'norwayirc'` -ne 277 && \ ${echo} 'restoration warning: size of norwayirc is not 277' fi fi # ============= norway.rb ============== if test -f 'norway.rb' && test "$first_param" != -c; then ${echo} 'x -SKIPPING norway.rb (file already exists)' else ${echo} 'x - extracting norway.rb (text)' sed 's/^X//' << 'SHAR_EOF' > 'norway.rb' && #!/usr/bin/ruby str = ARGV[0] || "NORWAY?" cnt = ARGV[1] || 7 X $tags = %w{b tt i s blink u big small u} X class String X def norwify X arr = self.split('') X $tags.each do |t| X arr.collect! do |e| X if e =~ /[[:space:]]/: e # Don't bother making a space any fancier X elsif rand(2) == 1: "<#{t}>#{e}" X else e X end X end X end X arr.join X end end X puts ("#{str} " * cnt.to_i).norwify SHAR_EOF (set 20 08 06 03 20 21 00 'norway.rb'; eval "$shar_touch") && chmod 0755 'norway.rb' if test $? -ne 0 then ${echo} 'restore of norway.rb failed' fi if ${md5check} then ( ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'norway.rb: MD5 check failed' ) << SHAR_EOF bb0eacc5210323b328e06d13969b7d29 norway.rb SHAR_EOF else test `LC_ALL=C wc -c < 'norway.rb'` -ne 497 && \ ${echo} 'restoration warning: size of norway.rb is not 497' fi fi if rm -fr ${lock_dir} then ${echo} 'x - removed lock directory `'${lock_dir}\''.' else ${echo} 'x - failed to remove lock directory `'${lock_dir}\''.' exit 1 fi exit 0