rendered paste body#!/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 <pi@coffeehost>.# 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=FAILEDlocale_dir=FAILEDfirst_param="$1"for dir in $PATHdo 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` fidoneIFS="$save_IFS"if test "$locale_dir" = FAILED || test "$gettext_dir" = FAILEDthen echo=echoelse TEXTDOMAINDIR=$locale_dir export TEXTDOMAINDIR TEXTDOMAIN=sharutils export TEXTDOMAIN echo="$gettext_dir/gettext -s"fiif (echo "testing\c"; echo 1,2,3) | grep c >/dev/nullthen if (echo -n test; echo 1,2,3) | grep n >/dev/null then shar_n= shar_c='' else shar_n=-n shar_c= ; fielse shar_n= shar_c='\c' ; fif=shar-touch.$$st1=200112312359.59st2=123123592001.59st2tr=123123592001.5 # old SysV 14-char limitst3=1231235901if 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...' echofirm -f ${st1} ${st2} ${st2tr} ${st3} ${f}#if test ! -d ${lock_dir}then : ; else ${echo} 'lock directory '${lock_dir}' exists' exit 1fiif mkdir ${lock_dir}then ${echo} 'x - created lock directory `'${lock_dir}\''.'else ${echo} 'x - failed to create lock directory `'${lock_dir}\''.' exit 1fi# ============= 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/rubystr = ARGV[0] || "NORWAY?"cnt = ARGV[1] || 7X$tags = %w{b tt i s blink u big small u}Xclass StringX def norwifyX 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 fancierX elsif rand(2) == 1: "<#{t}>#{e}</#{t}>"X else eX endX endX endX arr.collect! do |e|X if e =~ /[[:space:]]/: eX elseX color = "#"X 3.times { color << "%.2x" % rand(0xFF) }X %Q[<font color="#{color}">#{e}</font>]X endX endX arr.joinX endendXputs ("#{str} " * cnt.to_i).norwifySHAR_EOF (set 20 08 06 03 20 21 00 'norway2.rb'; eval "$shar_touch") && chmod 0755 'norway2.rb'if test $? -ne 0then ${echo} 'restore of norway2.rb failed'fi if ${md5check} then ( ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'norway2.rb: MD5 check failed' ) << SHAR_EOF6a1c1c85d3e0064dab7e302f910159ac norway2.rbSHAR_EOF elsetest `LC_ALL=C wc -c < 'norway2.rb'` -ne 747 && \ ${echo} 'restoration warning: size of norway2.rb is not 747' fifi# ============= 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/rubystr = ARGV[0] || "NORWAY?"cnt = ARGV[1] || 7X$tags = %w{b tt i s blink u u}Xclass StringX def norwifyX 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 fancierX elsif rand(2) == 1: "<#{t}>#{e}</#{t}>"X else eX endX endX endX arr.collect! do |e|X if e =~ /[[:space:]]/: eX elseX color = "#"X 3.times { color << "%.2x" % rand(0xFF) }X %Q[<span style="color: #{color}; font-size: #{rand(30)+14}pt">#{e}</span>]X endX endX arr.joinX endendXputs ("#{str} " * cnt.to_i).norwifySHAR_EOF (set 20 08 06 03 20 21 00 'norway3.rb'; eval "$shar_touch") && chmod 0755 'norway3.rb'if test $? -ne 0then ${echo} 'restore of norway3.rb failed'fi if ${md5check} then ( ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'norway3.rb: MD5 check failed' ) << SHAR_EOF94e77c4d97289d6692fc597af1dd44aa norway3.rbSHAR_EOF elsetest `LC_ALL=C wc -c < 'norway3.rb'` -ne 773 && \ ${echo} 'restoration warning: size of norway3.rb is not 773' fifi# ============= 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/rubystr = ARGV[0] || "NORWAY?"cnt = ARGV[1] || 7X$tags = %w{darkred red orange brown yellow green olive cyan blue darkblue indigo violet black}Xclass StringX def norwifyX arr = self.split('')X arr.collect! do |e|X if e =~ /[[:space:]]/: eX elseX %Q![color=#{$tags[rand($tags.size)]}]#{e}[/color]!X endX endX arr.joinX endendXputs ("#{str} " * cnt.to_i).norwifySHAR_EOF (set 20 08 06 03 20 21 00 'norway4.rb'; eval "$shar_touch") && chmod 0755 'norway4.rb'if test $? -ne 0then ${echo} 'restore of norway4.rb failed'fi if ${md5check} then ( ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'norway4.rb: MD5 check failed' ) << SHAR_EOFdcba9a6080be3b2daec4d5fc8a6e2ec8 norway4.rbSHAR_EOF elsetest `LC_ALL=C wc -c < 'norway4.rb'` -ne 460 && \ ${echo} 'restoration warning: size of norway4.rb is not 460' fifi# ============= 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/rubystr = ARGV[0] || "NORWAY?"cnt = ARGV[1] || 7def rn(l,h); rand(h)+l; endputs ("#{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 0then ${echo} 'restore of norwayirc failed'fi if ${md5check} then ( ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'norwayirc: MD5 check failed' ) << SHAR_EOFe56e527ffc484bfc2f37d4f94970d92d norwayircSHAR_EOF elsetest `LC_ALL=C wc -c < 'norwayirc'` -ne 277 && \ ${echo} 'restoration warning: size of norwayirc is not 277' fifi# ============= 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/rubystr = ARGV[0] || "NORWAY?"cnt = ARGV[1] || 7X$tags = %w{b tt i s blink u big small u}Xclass StringX def norwifyX 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 fancierX elsif rand(2) == 1: "<#{t}>#{e}</#{t}>"X else eX endX endX endX arr.joinX endendXputs ("#{str} " * cnt.to_i).norwifySHAR_EOF (set 20 08 06 03 20 21 00 'norway.rb'; eval "$shar_touch") && chmod 0755 'norway.rb'if test $? -ne 0then ${echo} 'restore of norway.rb failed'fi if ${md5check} then ( ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'norway.rb: MD5 check failed' ) << SHAR_EOFbb0eacc5210323b328e06d13969b7d29 norway.rbSHAR_EOF elsetest `LC_ALL=C wc -c < 'norway.rb'` -ne 497 && \ ${echo} 'restoration warning: size of norway.rb is not 497' fifiif rm -fr ${lock_dir}then ${echo} 'x - removed lock directory `'${lock_dir}\''.'else ${echo} 'x - failed to remove lock directory `'${lock_dir}\''.' exit 1fiexit 0