HomePhorge

Refactoring duplicate code and logic in prep for DESTDIR deprecation.
f4a0af16eaa3Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Refactoring duplicate code and logic in prep for DESTDIR deprecation.

DESTDIR is slated to be deprecated. The block of code that checks for
DESTDIR contained duplicate code as the block that checks for --destdir.

The dupe code has been moved out of the destdir checks.

I have also flipped the order of checking. Previously, if the DESTDIR env was set
it would be used regardless of whether or not the --destdir flag was set.

No env, no flag:
./install.rb
destdir = nil

Env only:
DESTDIR="foo" ./install.rb
destdir = foo

Flag only:
./install.rb --destdir="bar"
destdir = bar

Both (uses flag):
DESTDIR="foo" ./install.rb --destdir="bar"
destdir = bar

Details

Provenance
Elias Lutfallah <elias.lutfallah@orbitz.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU609ddcf2b1ae: Merge branch 'ticket/2.6.next/6606' into 2.6.next
Branches
Unknown
Tags
Unknown

Event Timeline

Elias Lutfallah <elias.lutfallah@orbitz.com> committed rPUf4a0af16eaa3: Refactoring duplicate code and logic in prep for DESTDIR deprecation. (authored by Elias Lutfallah <elias.lutfallah@orbitz.com>).Mar 5 2011, 10:28 PM