#!/bin/sh -e
# script that asks for byte compiling of Dotfile modules, by Josip Rodin.

cd /usr/X11R6/lib/X11/dotfile

echo " "
echo " Byte compiled Dotfile modules run significantly faster."
echo " Do you want to:"
echo "  1. automatically bytecompile Dotfile modules as they get installed,"
echo "  2. pick which Dotfile modules to bytecompile yourself, or"
echo "  3. completely skip automatic bytecompilation of all Dotfile modules?"
echo -n " Choose from 1, 2, or 3: "; read answer
echo " "
case $answer in
  3)
    echo " You can bytecompile any module later by typing:"
    echo "   dotfile <module> bytecompile"
    rm -f *-bytecompiles
    touch no-bytecompiles
    ;;
  2)
    echo " Very well, you'll get more questions later."
    rm -f *-bytecompiles
    touch pi-bytecompiles
    ;;
  *)
    echo " All Dotfile modules will be bytecompiled automatically."
    rm -f *-bytecompiles
    touch do-bytecompiles
    ;;
esac
