self-extract-src.sh
author Dan Fuhry <dan@enanocms.org>
Mon, 05 Jul 2010 23:57:56 -0400
changeset 5 7d3b7009399d
parent 4 c6c431cf0a89
permissions -rw-r--r--
Added OS X tr workaround; added support for making Mercurial-only packages that pull Enano from Mercurial and install it using mkenanodev
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
     1
#!/bin/bash
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
     2
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
     3
if test -z "$BASH"; then
1
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
     4
  cmd="$0"
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
     5
  if test "`basename $0`" = "$0"; then
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
     6
    cmd="./$0"
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
     7
  fi
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
     8
  echo "This script is designed to be run using GNU bash."
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
     9
  echo "Try: chmod +x $0 && $cmd"
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    10
  exit 1
0
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
    11
fi
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
    12
4
c6c431cf0a89 OS X compatibility hell yeah!
Dan Fuhry <dan@enanocms.org>
parents: 1
diff changeset
    13
# OS X sed (at least leopard and up) seem to support -E
c6c431cf0a89 OS X compatibility hell yeah!
Dan Fuhry <dan@enanocms.org>
parents: 1
diff changeset
    14
sedflags=Ee
c6c431cf0a89 OS X compatibility hell yeah!
Dan Fuhry <dan@enanocms.org>
parents: 1
diff changeset
    15
if ( sed --version 2>&1 | grep 'GNU sed' 2>&1 ) > /dev/null ; then
c6c431cf0a89 OS X compatibility hell yeah!
Dan Fuhry <dan@enanocms.org>
parents: 1
diff changeset
    16
	sedflags=re
c6c431cf0a89 OS X compatibility hell yeah!
Dan Fuhry <dan@enanocms.org>
parents: 1
diff changeset
    17
fi
c6c431cf0a89 OS X compatibility hell yeah!
Dan Fuhry <dan@enanocms.org>
parents: 1
diff changeset
    18
0
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
    19
my_which_real()
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
    20
{
1
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    21
  test -n "$1" || return 1
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    22
  local i
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    23
  local part
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    24
  for (( i=1; ; i++ )); do
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    25
    part=`echo "$PATH" | cut -d ':' -f $i`
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    26
    test -n "$part" || return 1
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    27
    if test -x "$part/$1"; then
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    28
      echo "$part/$1"
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    29
      return 0
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    30
    fi
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    31
  done
0
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
    32
}
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
    33
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
    34
my_which()
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
    35
{
1
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    36
  local out
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    37
  local r
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    38
  out=`my_which_real "$1"`
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    39
  r=$?
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    40
  if [ -z "$out" -o $r = 1 ]; then
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    41
    echo "ERROR: $1 command not found on system" 1>&2
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    42
    exit 1
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    43
  fi
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    44
  echo $out
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    45
  return $r
0
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
    46
}
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
    47
1
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    48
# Show the extraction progress spinner.
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    49
# Spins the propeller one time for each line on stdin
0
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
    50
progressbit()
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
    51
{
1
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    52
  local i
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    53
  local pbar
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    54
  local line
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    55
  i=0
0
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
    56
  pbar="-\\|/"
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
    57
  while read line; do
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
    58
    ((i++))
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
    59
    j=$(($i % ${#pbar}))
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
    60
    echo -ne "\r${pbar:$j:1} Extracting..."
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
    61
  done
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
    62
}
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
    63
1
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    64
# Create a temp directory. Very bad in terms of randomness source, but hey, I'm a security major. Can't help it.
0
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
    65
mktempdir()
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
    66
{
1
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    67
  local tempdir
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    68
  tempdir=/tmp/ext`$dd if=/dev/urandom bs=128 count=1 2>/dev/null | $md5sum - | cut -c 1-6`
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    69
  echo $tempdir
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    70
  return 0
0
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
    71
}
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
    72
1
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    73
# Outputs the raw compressed tarball data on stdout.
0
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
    74
getdata()
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
    75
{
1
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    76
  offset=`$cat $0 | $grep -an '^##DATA' | cut -d ':' -f 1 || exit 1`
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    77
  offset=$((offset + 1))
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    78
  $cat $0 | $tail -n+$offset
0
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
    79
}
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
    80
1
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    81
# Go through each required command, and make sure it's on the system. If not, fail.
4
c6c431cf0a89 OS X compatibility hell yeah!
Dan Fuhry <dan@enanocms.org>
parents: 1
diff changeset
    82
for cmd in bzip2 tar grep tail cat wc dd; do
1
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    83
  my_which $cmd>/dev/null || exit 1
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    84
  eval $cmd=`my_which $cmd`
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    85
  if test x$? = x1; then
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    86
    exit 1
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
    87
  fi
0
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
    88
done
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
    89
4
c6c431cf0a89 OS X compatibility hell yeah!
Dan Fuhry <dan@enanocms.org>
parents: 1
diff changeset
    90
# special case for md5sum
c6c431cf0a89 OS X compatibility hell yeah!
Dan Fuhry <dan@enanocms.org>
parents: 1
diff changeset
    91
if my_which_real md5sum 2>&1 > /dev/null; then
c6c431cf0a89 OS X compatibility hell yeah!
Dan Fuhry <dan@enanocms.org>
parents: 1
diff changeset
    92
	md5sum=`my_which_real md5sum`
c6c431cf0a89 OS X compatibility hell yeah!
Dan Fuhry <dan@enanocms.org>
parents: 1
diff changeset
    93
elif my_which_real openssl 2>&1 > /dev/null; then
c6c431cf0a89 OS X compatibility hell yeah!
Dan Fuhry <dan@enanocms.org>
parents: 1
diff changeset
    94
	md5sum=md5sum
c6c431cf0a89 OS X compatibility hell yeah!
Dan Fuhry <dan@enanocms.org>
parents: 1
diff changeset
    95
	md5sum()
c6c431cf0a89 OS X compatibility hell yeah!
Dan Fuhry <dan@enanocms.org>
parents: 1
diff changeset
    96
	{
c6c431cf0a89 OS X compatibility hell yeah!
Dan Fuhry <dan@enanocms.org>
parents: 1
diff changeset
    97
		local f=${1:--}
c6c431cf0a89 OS X compatibility hell yeah!
Dan Fuhry <dan@enanocms.org>
parents: 1
diff changeset
    98
		cat $f | openssl dgst -md5 | sed -$sedflags 's/^\(stdin\)= //'
c6c431cf0a89 OS X compatibility hell yeah!
Dan Fuhry <dan@enanocms.org>
parents: 1
diff changeset
    99
	}
c6c431cf0a89 OS X compatibility hell yeah!
Dan Fuhry <dan@enanocms.org>
parents: 1
diff changeset
   100
else
c6c431cf0a89 OS X compatibility hell yeah!
Dan Fuhry <dan@enanocms.org>
parents: 1
diff changeset
   101
	echo "Could not find md5sum or openssl"
c6c431cf0a89 OS X compatibility hell yeah!
Dan Fuhry <dan@enanocms.org>
parents: 1
diff changeset
   102
	exit 1
c6c431cf0a89 OS X compatibility hell yeah!
Dan Fuhry <dan@enanocms.org>
parents: 1
diff changeset
   103
fi
c6c431cf0a89 OS X compatibility hell yeah!
Dan Fuhry <dan@enanocms.org>
parents: 1
diff changeset
   104
0
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   105
tempdir=""
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   106
extractonly=0
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   107
while test -n "$1"; do
1
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   108
  case "$1" in
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   109
    -x)
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   110
      extractonly=1
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   111
      if test -n "$2"; then
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   112
        tempdir=$2
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   113
      else
4
c6c431cf0a89 OS X compatibility hell yeah!
Dan Fuhry <dan@enanocms.org>
parents: 1
diff changeset
   114
        tempdir=`echo $0 | sed -$sedflags 's/\.[a-z0-9_-]{1,5}$//'`
1
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   115
      fi
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   116
      ;;
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   117
  esac
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   118
  shift
0
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   119
done
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   120
1
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   121
# Make sure we have a working temp directory
0
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   122
test -n "$tempdir" || tempdir=`mktempdir`
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   123
1
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   124
if [ -d "$tempdir" ]; then
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   125
  if [ $extractonly = 1 ]; then
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   126
    i=0
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   127
    basetemp="$tempdir"
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   128
    while test -d "$tempdir"; do
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   129
      tempdir="${basetemp}${i}"
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   130
      ((i++))
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   131
    done
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   132
  else
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   133
    while test -d "$tempdir"; do
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   134
      tempdir=`mktempdir`
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   135
    done
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   136
  fi
0
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   137
fi
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   138
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   139
mkdir "$tempdir" || exit 1
1
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   140
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   141
# Finally, extract the data.
0
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   142
echo -ne "\e[?25l- Extracting..."
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   143
getdata | $bzip2 -dc | $tar xvCf $tempdir - | progressbit \
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   144
  || (
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   145
      rm -rf $tempdir
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   146
      echo -ne "\e[?25h"
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   147
      exit 1
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   148
     )
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   149
1
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   150
# clear out the extraction progress
0
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   151
echo -ne "\r\e[?25h"
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   152
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   153
# trap exits so we can clean up if the script is interrupted
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   154
handle_interrupt()
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   155
{
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   156
  rm -rf $tempdir
1
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   157
  # added in rev. 2, interrupts should cause an error exit
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   158
  exit 1
0
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   159
}
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   160
trap handle_interrupt 0
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   161
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   162
if test -x $tempdir/autorun.sh && test $extractonly != 1; then
1
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   163
  # Run the autorun script
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   164
  $tempdir/autorun.sh
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   165
  ret=$?
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   166
  rm -rf $tempdir
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   167
  exit $ret
0
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   168
else
1
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   169
  # Just let the user know where the files are and die.
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   170
  echo "Contents extracted to $tempdir."
0
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   171
fi
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   172
1
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   173
# free our trap on signals
0
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   174
trap "exit 0;" 0
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   175
1
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   176
# done!
0
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   177
exit 0
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   178
1
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   179
# don't touch this marker! Everything after this is expected to be binary data.
dbce0b16b0c1 Added shellscript compactor to reduce size of self-extract script
Dan
parents: 0
diff changeset
   180
0
8e044e762a6c First revision, but working.
Dan
parents:
diff changeset
   181
##DATA