summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorbartus2020-06-12 00:35:25 +0200
committerbartus2020-06-12 00:35:25 +0200
commitb3c57eaac9fa6ce74757e9f839ddaa13cb04bf81 (patch)
treef8aefbfb0f6d33179bea4a450655becd141cd4d5
parentcb64b71c7a117a4be2b0cb649d67692df59df84b (diff)
downloadaur-b3c57eaac9fa6ce74757e9f839ddaa13cb04bf81.tar.gz
Fix shellcheck warnings.
-rw-r--r--PKGBUILD11
1 files changed, 6 insertions, 5 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 99cb6b59e26..d8305ba42ec 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -25,13 +25,14 @@ pkgver() {
package() {
depends=("blender>=2.80" "luxcorerender>=${pkgver%.r*}" )
_blender=$(pacman -Sddp --print-format %v blender|grep -oP '(?<=\:)[[:digit:]]{1}\.[[:digit:]]{2}(?=)')
- install -d -m755 ${pkgdir}/usr/share/blender/${_blender}/scripts/addons
- cp -a ${srcdir}/${_name}/ ${pkgdir}/usr/share/blender/${_blender}/scripts/addons
+ install -d -m755 "${pkgdir}"/usr/share/blender/"${_blender}"/scripts/addons
+ cp -a "${srcdir}/${_name}/" "${pkgdir}"/usr/share/blender/"${_blender}"/scripts/addons
# change the search path in exporter so it finds pylux in its new location :(previous solution was much better, what happen to blendlux )
#sed -i 's|from.*import pylux|import pylux|' "$pkgdir/usr/share/blender/$_blender/scripts/addons/luxrender/outputs/pure_api.py"
- for file in `grep -rl import\ pyluxcore ${pkgdir}` ; do sed -i 's/from .* import pyluxcore/import pyluxcore/g' $file; done
- rm -rf ${pkgdir}/usr/share/blender/${_blender}/scripts/addons/${_name}/bin
- rm -rf ${pkgdir}/usr/share/blender/${_blender}/scripts/addons/${_name}/.{git,github,gitignore}
+# shellcheck disable=SC2013 # works until path has no white space.
+ for file in $(grep -rl import\ pyluxcore "${pkgdir}") ; do sed -i 's/from .* import pyluxcore/import pyluxcore/g' "$file"; done
+ rm -rf "${pkgdir}"/usr/share/blender/"${_blender}"/scripts/addons/${_name}/bin
+ rm -rf "${pkgdir}"/usr/share/blender/"${_blender}"/scripts/addons/${_name}/.{git,github,gitignore}
}
# vim:set ts=2 sw=2 et: