about summary refs log tree commit homepage
path: root/Rakefile
diff options
context:
space:
mode:
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile7
1 files changed, 7 insertions, 0 deletions
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|