package/luarocks: fix copying our custom command if dest dir exists
authorBartosz Bilas <b.bilas@grinn-global.com>
Sun, 3 Jan 2021 08:35:26 +0000 (09:35 +0100)
committerYann E. MORIN <yann.morin.1998@free.fr>
Sun, 3 Jan 2021 08:59:06 +0000 (09:59 +0100)
Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
[yann.morin.1998@free.fr:
  - use $(INSTALL), not "mkdir -p + cp"
  - split to its own patch
  - rewrite commit title
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
package/luarocks/luarocks.mk

index 42966ea6396ba0177e6f5ea8082d28edde6027bb..dd11b738addebb4d2d7bf2d53bf01dad20184df4 100644 (file)
@@ -17,8 +17,7 @@ LUAROCKS_CONFIG_FILE = $(LUAROCKS_CONFIG_DIR)/luarocks/config.lua
 HOST_LUAROCKS_CONFIG_FILE = $(LUAROCKS_CONFIG_DIR)/luarocks/host-config.lua
 
 define LUAROCKS_ADDON_EXTRACT
-       mkdir $(@D)/src/luarocks/cmd/external
-       cp package/luarocks/buildroot.lua $(@D)/src/luarocks/cmd/external/buildroot.lua
+       $(INSTALL) -D -m 0644 package/luarocks/buildroot.lua $(@D)/src/luarocks/cmd/external/buildroot.lua
 endef
 HOST_LUAROCKS_POST_EXTRACT_HOOKS += LUAROCKS_ADDON_EXTRACT