Avoid gzip "-k" option for wider OS compatibility

The "-k" option tells gzip to keep the original files intact and is an
alternative to `gzip -c file > file.gz`. It was implemented in 2013:
http://git.savannah.gnu.org/cgit/gzip.git/commit/?id=0192f02

There are a few popular operating systems (ie, Red Hat 7, Debian Wheezy)
whose version of gzip does not have the "-k" option. Compiling assets
breaks on these operating systems. Using "-c" instead ensures that it
works even with older versions of gzip.
This commit is contained in:
Jamie Nguyen 2015-02-24 15:07:54 +00:00
parent 34af7f20af
commit 5d16db1c48
1 changed files with 1 additions and 1 deletions

View File

@ -118,7 +118,7 @@ end
def gzip(path) def gzip(path)
STDERR.puts "gzip #{path}" STDERR.puts "gzip #{path}"
STDERR.puts `gzip -f -k -9 #{path}` STDERR.puts `gzip -f -c -9 #{path} > #{path}.gz`
end end
def compress(from,to) def compress(from,to)