# Function to generate the html pages and directory tree

echo "Welcome to Bike Maintain $VERSION"
echo ""
echo "This appears to be the first time you have run Bike Maintain"
echo "Please wait while I generate a few essentials"

# Copys the Index page template to its new home
# Serves as a place holder to make navigation easier
# Will further simplify at some point, I promise!
cp bins/structureroot ./Index.html
mkdir data
mkdir html
echo "Please enter information about the vehicle in a moment. You can edit it later if needs be"
echo ""
echo "Press enter to continue"
read tmp1
$EDITOR ./data/vehicle
echo "FIRSTRUN=N" > ./.firstrun
source ./bins/generatehtml
echo "OK fantastic, I've created the blank HTML Pages, and the directory tree"
echo "Restarting the script"
echo ""
echo ""
./bikemaintain