Thursday, November 19, 2015

Rename all .css.scss to .scss file

Stolen script to make upgrade to Rails 4.2 easier: Save it as .sh file, run chmod 755 renamer.sh

#! /usr/bin/env bash


for f in $(find . -type f -iname '*.css.scss'); do

renamed=$(echo "${f}" | sed 's/.css.scss$/.scss/g')

cmd="git mv ${f} ${renamed}"

echo $cmd

eval $cmd

done