Merge pull request #10815 from Cynerd/zsh-invalid-postrm
zsh: fix invalid postrm script and little refactor of scripts
This commit is contained in:
commit
c50497dedc
1 changed files with 7 additions and 6 deletions
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=zsh
|
PKG_NAME:=zsh
|
||||||
PKG_VERSION:=5.6.2
|
PKG_VERSION:=5.6.2
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||||
PKG_SOURCE_URL:=@SF/zsh
|
PKG_SOURCE_URL:=@SF/zsh
|
||||||
|
@ -92,7 +92,7 @@ grep zsh $${IPKG_INSTROOT}/etc/shells || \
|
||||||
echo "/usr/bin/zsh" >> $${IPKG_INSTROOT}/etc/shells
|
echo "/usr/bin/zsh" >> $${IPKG_INSTROOT}/etc/shells
|
||||||
|
|
||||||
# Backwards compatibility
|
# Backwards compatibility
|
||||||
if [[ -e /bin/zsh ]] && ([[ ! -L /bin/zsh ]] || [[ "$(readlink -fn $${IPKG_INSTROOT}/bin/zsh)" != "../$(CONFIGURE_PREFIX)/bin/zsh" ]]); then
|
if [ -e /bin/zsh ] && { [ ! -L /bin/zsh ] || [ "$(readlink -fn $${IPKG_INSTROOT}/bin/zsh)" != "../$(CONFIGURE_PREFIX)/bin/zsh" ]; }; then
|
||||||
ln -fs "../$(CONFIGURE_PREFIX)/bin/zsh" "$${IPKG_INSTROOT}/bin/zsh"
|
ln -fs "../$(CONFIGURE_PREFIX)/bin/zsh" "$${IPKG_INSTROOT}/bin/zsh"
|
||||||
fi
|
fi
|
||||||
endef
|
endef
|
||||||
|
@ -107,6 +107,7 @@ define Package/zsh/install
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/zsh/postrm
|
define Package/zsh/postrm
|
||||||
|
#!/bin/sh
|
||||||
rm -rf "$${IPKG_INSTROOT}/$(CONFIGURE_PREFIX)/share/zsh/$(PKG_VERSION)"
|
rm -rf "$${IPKG_INSTROOT}/$(CONFIGURE_PREFIX)/share/zsh/$(PKG_VERSION)"
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue