diff options
author | Bertrand Jacquin <bertrand@jacquin.bzh> | 2016-09-06 20:50:39 +0100 |
---|---|---|
committer | Bertrand Jacquin <bertrand@jacquin.bzh> | 2016-09-14 21:01:56 +0100 |
commit | 8c5d3921fbb5d9365621b54f18ab882008103550 (patch) | |
tree | 6ee5d83cf895505ecb1b3ba9fba0cb3bfbc71e82 /eclass/flx-init-scripts.eclass | |
parent | eclass: Rename flx.eclass to flx-init-scripts.eclass (diff) | |
download | portage-8c5d3921fbb5d9365621b54f18ab882008103550.tar.xz |
eclass/flx: Update syntax
Diffstat (limited to 'eclass/flx-init-scripts.eclass')
-rw-r--r-- | eclass/flx-init-scripts.eclass | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/eclass/flx-init-scripts.eclass b/eclass/flx-init-scripts.eclass index 04b6713d..8b49968c 100644 --- a/eclass/flx-init-scripts.eclass +++ b/eclass/flx-init-scripts.eclass @@ -24,30 +24,29 @@ IUSE="" EXPORT_FUNCTIONS src_prepare src_install flx-init-scripts_src_prepare() { - [ -d addons -a ! -e add-ons ] \ - && mv addons add-ons + if [[ -d addons && ! -e add-ons ]] ; then + mv addons add-ons + fi local _f for _f in \ - add-ons/initscript \ - add-ons/init.d/${SVCNAME} \ - add-ons/${SVCNAME}.init + add-ons/initscript \ + "add-ons/init.d/${SVCNAME}" \ + "add-ons/${SVCNAME}.init" do - if [ -e $_f ] ; then - fINIT=$_f - break - fi + if [[ -e "${_f}" ]] ; then + mv "${_f}" "add-ons/${SVCNAME}" + break + fi done - [ -n "${fINIT}" ] \ - && mv ${fINIT} add-ons/${SVCNAME} } flx-init-scripts_src_install() { - cd ${S} + cd "${S}" exeinto /sbin/init.d - doexe add-ons/${SVCNAME} + doexe "add-ons/${SVCNAME}" - [ -e ChangeLog ] && dodoc ChangeLog + [[ -e ChangeLog ]] && dodoc ChangeLog } |