]> git.ipfire.org Git - thirdparty/dracut.git/commit
dracut: Ajusting variables name for --include 35/head
authorErwan Velu <erwan.velu@enovance.com>
Fri, 19 Dec 2014 13:49:00 +0000 (14:49 +0100)
committerErwan Velu <erwan.velu@enovance.com>
Fri, 19 Dec 2014 13:49:00 +0000 (14:49 +0100)
commitc9364f6ea296a03073bc4096756e3a61ca095c0e
tree13c0381f26e3e61e816fd24d58378ed8edbc92c4
parent332ecaa900a5af83ffae64f3e103270e49de88de
dracut: Ajusting variables name for --include

When reading the --include part of the script, we had the following
issues to make the code easy to read:
- src & tgt were extract for the original options
- i variable was a file or a directory from src
- s variable was the directory name in case $i was a directory

"s" sounds very close to "src" while "s" is on the "tgt" side. Very
confusing.

"s" was defined before the "if it's a directory" statement while it's
only used inside the "if".

"i" was commit from the "src" but wasn't really explicit.

Having some lines mixing "i" and "s" takes a little time to get read
properly.

This patch offer the following changes:
- "i" is renamed to "objectname" as we don't know if its a file or a
  directory

- "s" is renamed to "object_destdir" as the object name becomes a
  directory on the destdir

- "object_destdir" (former "s") is moved inside the "if" statement as it's
  only used here

- tgt is finally renamed to "target" to be more explicit. We are not all
  native english ;o)

My 2 (semantic) cents,
dracut.sh