Skip to content
Snippets Groups Projects
Commit fe29cc29 authored by Mike McQuaid's avatar Mike McQuaid Committed by GitHub
Browse files

cleaner: port to generic OS. (#447)

parent 883b201c
No related branches found
No related tags found
No related merge requests found
......@@ -66,6 +66,10 @@ class Cleaner
end
end
def executable_path?(path)
path.text_executable?
end
# Clean a top-level (bin, sbin, lib) directory, recursively, by fixing file
# permissions and removing .la files, unless the files (or parent
# directories) are protected by skip_clean.
......@@ -87,7 +91,7 @@ class Cleaner
path.unlink
else
# Set permissions for executables and non-executables
perms = if path.mach_o_executable? || path.text_executable?
perms = if executable_path?(path)
0555
else
0444
......@@ -103,3 +107,5 @@ class Cleaner
end
end
end
require "extend/os/cleaner"
require "cleaner"
if OS.mac?
require "extend/os/mac/cleaner"
end
class Cleaner
private
def executable_path?(path)
path.mach_o_executable? || path.text_executable?
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment