Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- fix "Copy and merge var and target/var to $(STAGING_DIR)/var"
  • Loading branch information
hgy59 committed Apr 19, 2022
1 parent 1e1a1e5 commit f0595b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mk/spksrc.copy.mk
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ ifeq ($(call version_ge, ${TCVERSION}, 7.0),1)
@$(MSG) [DSM7+] Copy target to staging, discard var directory
@(mkdir -p $(STAGING_DIR) && cd $(INSTALL_DIR)/$(INSTALL_PREFIX) && tar cpf - `cat $(INSTALL_PLIST) | sed -e '/^.*:var\/.*/d' -e 's/^.*://g'`) | \
tar xpf - -C $(STAGING_DIR)
@$(MSG) "[DSM7+] Copy & merge var and target/var to $(STAGING_DIR)/var"
@$(MSG) "[DSM7+] Copy and merge var and target/var to $(STAGING_DIR)/var"
@if [ "`cat $(INSTALL_PLIST) | sed -n 's?^.*:var/??p'`" ] ; then \
mkdir -p $(STAGING_DIR)/var ; \
(cd $(INSTALL_DIR)/$(INSTALL_PREFIX) && tar cpf - $$(eval ls -d $$(cat $(INSTALL_PLIST) | sed -n 's?^.*:var/??p' | sed -e 's?^?{var,target/var}/?') 2>/dev/null)) | \
tar xpf - -C $(STAGING_DIR)/var --strip-components=1 --transform='s!^target/!!' ; \
(cd $(INSTALL_DIR)/$(INSTALL_PREFIX)/../var && tar cpf - $$(eval ls -d $$(cat $(INSTALL_PLIST) | sed -n 's?^.*:var/??p') 2>/dev/null)) | tar xpf - -C $(STAGING_DIR)/var ; \
(cd $(INSTALL_DIR)/$(INSTALL_PREFIX)/var && tar cpf - $$(eval ls -d $$(cat $(INSTALL_PLIST) | sed -n 's?^.*:var/??p') 2>/dev/null)) | tar xpf - -C $(STAGING_DIR)/var ; \
fi
else
@$(MSG) Copy target to staging [DSM6]
Expand Down

0 comments on commit f0595b5

Please sign in to comment.