From cbff83913a901a32e7d77f647b93ccb5883a91e2 Mon Sep 17 00:00:00 2001 From: Adam Demasi Date: Tue, 20 Mar 2018 09:03:45 +1030 Subject: [PATCH] [preinst,makefile] ok we can blame this one entirely on me --- Makefile | 2 +- preinst | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 1833729..eaa7c60 100644 --- a/Makefile +++ b/Makefile @@ -61,7 +61,7 @@ ifneq ($(PACKAGE_BUILDNAME)$(IMAGENT),debug) endif $(ECHO_NOTHING)cp Resources/*.png $(THEOS_STAGING_DIR)/System/Library/Frameworks/UIKit.framework$(ECHO_END) - $(ECHO_NOTHING)ln -s /usr/lib/TypeStatus/TypeStatusProvider.framework $(THEOS_STAGING_DIR)/Library/Frameworks/TypeStatusProvider.framework$(ECHO_END) + $(ECHO_NOTHING)ln -s /usr/lib/TypeStatusProvider.framework $(THEOS_STAGING_DIR)/Library/Frameworks/TypeStatusProvider.framework$(ECHO_END) docs: stage $(ECHO_BEGIN)$(PRINT_FORMAT_MAKING) "Generating docs"; jazzy --module-version $(THEOS_PACKAGE_BASE_VERSION)$(ECHO_END) diff --git a/preinst b/preinst index d0fd8f1..6a2d0cb 100755 --- a/preinst +++ b/preinst @@ -2,7 +2,7 @@ set -e # delete a broken symlink if necessary -if [[ -h /Library/TypeStatus && "$(readlink -eq /Library/TypeStatus)" == "" ]]; then +if [[ -h /Library/TypeStatus && "$(readlink -q /Library/TypeStatus)" == "" ]]; then rm /Library/TypeStatus fi @@ -34,7 +34,7 @@ if [[ ! -h /Library/TypeStatus ]]; then fi # if the framework leads to the wrong place, fix it (why does this happen?) -fw_link="$(readlink -eq /Library/Frameworks/TypeStatusProvider.framework)" +fw_link="$(readlink -q /Library/Frameworks/TypeStatusProvider.framework || true)" if [[ "$fw_link" == "" || "$fw_link" == "/usr/lib/TypeStatus/TypeStatusProvider.framework" ]]; then rm -rf /Library/Frameworks/TypeStatusProvider.framework