Created
April 9, 2010 04:02
-
-
Save aanoaa/360884 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ibp b/ibp | |
old mode 100644 | |
new mode 100755 | |
index 99a99ca..22b7ae5 | |
--- a/ibp | |
+++ b/ibp | |
@@ -120,6 +120,13 @@ sub install { | |
File::Path::mkpath($name, 0, 0777); | |
system("unzip -q bp.zip -d ".$name); | |
system('rm -rf bp.zip'); | |
+ #system("perl -pi -e 's/(charset=)[a-zA-Z0-9\-]+/$1utf8/' $param{proj_name}/index.html"); | |
+ open(my $fh, '<', "$param{proj_name}/index.html") or die "Couldn't open $param{proj_name}/index.html\n"; | |
+ my $html = do { local $/; <$fh> }; | |
+ $html =~ s/(charset=)[a-zA-Z0-9\-]+/$1utf8/s; | |
+ open($fh, '>', "$param{proj_name}/index.html") or die "Couldn't open $param{proj_name}/index.html\n"; | |
+ print $fh $html; | |
+ close($fh); | |
} | |
package main; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment