Skip to content

Instantly share code, notes, and snippets.

@altamic
Created March 14, 2009 18:42
Show Gist options
  • Select an option

  • Save altamic/79142 to your computer and use it in GitHub Desktop.

Select an option

Save altamic/79142 to your computer and use it in GitHub Desktop.

Revisions

  1. altamic revised this gist Nov 21, 2009. 1 changed file with 14 additions and 14 deletions.
    28 changes: 14 additions & 14 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -1,15 +1,15 @@
    #! /bin/bash
    # erb2haml
    # by Michelangelo Altamore

    # Obtains a file list having an html.erb extension
    # under the current dir and convert each file
    # to haml format with html.haml extension.
    # It requires haml gem.

    for erb_file in `find . -name *.html.erb`; do
    if [ -f $erb_file ] ; then
    name=${erb_file%\.html.erb};
    html2haml ${erb_file} > ${name}.html.haml;
    fi;
    #! /bin/bash
    # erb2haml
    # by Michelangelo Altamore

    # Obtains a file list having an html.erb extension
    # under the current dir and convert each file
    # to haml format with html.haml extension.
    # It requires haml gem.

    for erb_file in `find . -name *.html.erb`; do
    if [ -f $erb_file ] ; then
    name=${erb_file%\.html.erb};
    html2haml -e ${erb_file} > ${name}.html.haml;
    fi;
    done
  2. altamic revised this gist Mar 14, 2009. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -2,8 +2,8 @@
    # erb2haml
    # by Michelangelo Altamore

    # Obtain a file list having a html.erb extension
    # under the current dir and conver each file
    # Obtains a file list having an html.erb extension
    # under the current dir and convert each file
    # to haml format with html.haml extension.
    # It requires haml gem.

  3. altamic created this gist Mar 14, 2009.
    15 changes: 15 additions & 0 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    #! /bin/bash
    # erb2haml
    # by Michelangelo Altamore

    # Obtain a file list having a html.erb extension
    # under the current dir and conver each file
    # to haml format with html.haml extension.
    # It requires haml gem.

    for erb_file in `find . -name *.html.erb`; do
    if [ -f $erb_file ] ; then
    name=${erb_file%\.html.erb};
    html2haml ${erb_file} > ${name}.html.haml;
    fi;
    done