about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rwxr-xr-xGIT-VERSION-GEN1
-rw-r--r--Rakefile7
2 files changed, 8 insertions, 0 deletions
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index 8ea7709..c86f3c3 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -27,4 +27,5 @@ cur_ruby_version = File.read(RVF) rescue nil
 if new_ruby_version != cur_ruby_version
   File.open(RVF, "w") { |fp| fp.write(new_ruby_version) }
 end
+File.chmod(0644, RVF)
 puts vn if $0 == __FILE__
diff --git a/Rakefile b/Rakefile
index 3cf474d..918153b 100644
--- a/Rakefile
+++ b/Rakefile
@@ -110,6 +110,13 @@ task tarball: "pkg/#{base}" do
   end
 end
 
+task "pkg/#{base}" => :fix_perms
+
+task :fix_perms do
+  sh "git ls-tree -r HEAD | awk '/^100644 / {print $NF}' | xargs chmod 644"
+  sh "git ls-tree -r HEAD | awk '/^100755 / {print $NF}' | xargs chmod 755"
+end
+
 task dist: [ :tarball, :package ] do
   Dir.chdir("pkg") do
     %w(dtas-linux dtas-mpris).each do |gem|