0
Eğer mevcut değilse ya da eskisinden farklıysa ve iki betiği işliyorsa HAML dosyasının kopyasını otomatik olarak oluşturmak için bu komut dosyasını yazdım ama her halükarda bunu çalıştırmak istiyorum. .Belirteç 'done' yakınlarında beklenmeyen bir hata oluştu
while true do;
if [ ! -f index_copy.haml ]; then
echo "\e[33mCreating 'index_copy.haml' file."
cp index.haml index_copy.haml
if [ $? -eq 0 ]; then
echo "\e[36mDone."
else
echo "\e[32mError!"
fi
fi
if cmp -s "index.haml" "index_copy.haml" ; then
cp index.haml index_copy.haml
echo -e "\e[34mProcessing HAML...\n"
haml index.haml index.html
cd css
echo -e "\e[32mProcessing SCSS...\n"
sass style.scss style.css
cd ..
echo -e "\e[36mDone."
fi
done