killshit.sh

Sign up for a GitHub account Sign in All Gists kyleterry / killshit.sh Created November 23, 2014 Code Revisions 1 /.sunken-menu-group /.sunken-menu-contents Embed HTTPS SSH You can clone with HTTPS or SSH . Download Gist /.only-with-full-nav View killshit.sh killshit.sh Raw File suppressed. Click to show. 1 2 3 4 5 6 7 8 9 10 #!/bin/bash - set -x while IFS= " : " read -r filename match ; do echo $match tag_name= $( echo ${match} | sed -n " s/^.*{% import \([a-zA-Z0-9_]*\) %}.*$/\1/p " ) sed -i " s~ ${tag_name} \.~~g " ${filename} sed -i ' s~{% import \([a-zA-Z0-9_]*\) %}~{% load \1 %}~g ' ${filename} done < <( grep -r ' {% import ' * | grep -v docs | grep -v killshit ) Sign up for free to join this conversation on ...

Linked on 2014-11-23 04:37:13 | Similar Links