#!/bin/sh top_dir=`pwd` output_dir=`pwd`/build echo -e "what do you want to clean? \n type 'pdf' for all pdf files\n 'html' for all html files\n 'all' for all the generated files." read cmd if [ $cmd = 'all' ]; then rm -r $output_dir/ exit fi langs="en fr es ru" for l in $langs; do cd $output_dir/$l if [ $cmd = 'html' ]; then rm -r html/ echo "removed all the generated html files" fi if [ $cmd = 'pdf' ]; then rm -r pdf/ echo "removed all the generated pdf files" fi cd $top_dir done