[cig-commits] [commit] devel: fixed a small problem in my new utils/clean_listings_specfem.pl: file permissions were erased (03bb77c)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Wed Jan 21 17:29:08 PST 2015
Repository : https://github.com/geodynamics/specfem3d
On branch : devel
Link : https://github.com/geodynamics/specfem3d/compare/151942b2854a2a62a0c8668f74626910e28cb924...03bb77ce5d50f06375ef160c35d4a234df7fa6ff
>---------------------------------------------------------------
commit 03bb77ce5d50f06375ef160c35d4a234df7fa6ff
Author: Dimitri Komatitsch <komatitsch at lma.cnrs-mrs.fr>
Date: Thu Jan 22 02:26:44 2015 +0100
fixed a small problem in my new utils/clean_listings_specfem.pl: file permissions were erased
>---------------------------------------------------------------
03bb77ce5d50f06375ef160c35d4a234df7fa6ff
utils/clean_listings_specfem.pl | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/utils/clean_listings_specfem.pl b/utils/clean_listings_specfem.pl
old mode 100644
new mode 100755
index 8ec0f9d..499b4d2
--- a/utils/clean_listings_specfem.pl
+++ b/utils/clean_listings_specfem.pl
@@ -184,9 +184,10 @@
chop $name;
print STDOUT "Cleaning $name ...\n";
- system("iconv -f utf-8 -t ASCII//TRANSLIT $name -o _____temp08_____ ; mv _____temp08_____ $name");
+# this preserves file permissions of executable files
+ system("cp -p $name _____temp08_____ ; iconv -f utf-8 -t ASCII//TRANSLIT _____temp08_____ -o _____temp09_____ ; cp _____temp09_____ $name");
}
- system("rm -f _____temp08_____");
+ system("rm -f _____temp08_____ _____temp09_____");
More information about the CIG-COMMITS
mailing list