summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorbartus2020-06-12 08:58:55 +0200
committerbartus2020-06-12 08:58:55 +0200
commitc328a10139e44c3a01d3c6f9d19cc426b465f3c1 (patch)
treedbbfabc8d348b933f3d82e9b5a7cd1d4e2f2fdc2
parentffb435f71589cb6bb4d8209b01b9e427b5c7002c (diff)
downloadaur-c328a10139e44c3a01d3c6f9d19cc426b465f3c1.tar.gz
Fix shellcheck warnings.
-rw-r--r--PKGBUILD12
1 files changed, 7 insertions, 5 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 0811b70a0666..d54c69a77586 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,3 +1,4 @@
+#!/hint/bash
# Maintainer : bartus <arch-user-repoᘓbartus.33mail.com>
_name="luxcorerender"
@@ -24,13 +25,14 @@ prepare() {
package() {
depends=("blender>=2.80" "luxcorerender>$pkgver")
_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}/BlendLuxCore-blendluxcore_v${_pkgver} ${pkgdir}/usr/share/blender/${_blender}/scripts/addons/${_name}
+ install -d -m755 "${pkgdir}"/usr/share/blender/"${_blender}"/scripts/addons
+ cp -a "${srcdir}"/BlendLuxCore-blendluxcore_v${_pkgver} "${pkgdir}"/usr/share/blender/${_blender}/scripts/addons/${_name}
# 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: