#!/bin/bash

VERSION=$1
PATH="/home/www/opencellsoft.com/dl/$VERSION"
INDEX="$PATH/index.html"
echo $PATH
echo $INDEX

#rm -f $PATH/index.html

echo '<html><body>' > $INDEX
cd $PATH
for FILE in *
do
  if [[ "$FILE" != "index.html" ]]
  then
    echo '<a href="http://dl.opencellsoft.com/'$VERSION'/'$FILE'">'$FILE'</a><br>' >> $INDEX
  fi
done
echo '</html></body>' >> $INDEX
