Created
September 10, 2011 06:07
-
-
Save mythosil/1207998 to your computer and use it in GitHub Desktop.
disable the localization of dirname in macosx
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
# | |
# Description: | |
# Disable the localization of directory' name in Mac OS X. | |
# | |
use strict; | |
use warnings; | |
my $home = $ENV{'HOME'}; | |
my @directories = ( | |
"$home/Desktop", | |
"$home/Documents", | |
"$home/Pictures", | |
"$home/Downloads", | |
"$home/Music", | |
"$home/Movies", | |
"$home/Sites", | |
"$home/Public", | |
"$home/Library", | |
"/Applications" | |
); | |
for my $d (@directories) { | |
my $old = $d . "/.localized"; | |
my $new = $old . ".disable"; | |
if (-e $old) { | |
rename $old, $new; | |
print "Disabled the localization for $d.\n"; | |
} else { | |
print "Localization for $d has already disabled.\n"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment