From a6940329489073fcf3f362ea56f97eb8d510c770 Mon Sep 17 00:00:00 2001 From: Isuldor Date: Tue, 13 Sep 2016 11:11:13 -0700 Subject: [PATCH] Specific script location for search --- ui/install | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ui/install b/ui/install index de703e9..1cb11bd 100755 --- a/ui/install +++ b/ui/install @@ -2,12 +2,11 @@ # Rebuild custom UI files using patches GAME_PATH=/mnt/d/EverQuest -SCRIPT_PATH=$(dirname ${0}) UI_NAME=isuldor if [[ ! -d "${GAME_PATH}/uifiles/default" ]] then - echo "Notice: Searching for game location..." + echo "Notice: Game path not set, searching for EverQuest..." GAME_LOCATION=$(find /mnt -type f -name eqgame.exe ! -path '*RECYCLE.BIN*' 2>/dev/null | head -n1) if [[ ${GAME_LOCATION} ]] then @@ -15,14 +14,18 @@ then echo "Setting GAME_PATH=${GAME_PATH}" else echo "Error: EverQuest was not found!" + exit 1 fi fi +SCRIPT_PATH=$(dirname ${0}) UI_FOLDER="${GAME_PATH}/uifiles/${UI_NAME}" -mkdir -vp "${UI_FOLDER}" -cp ${SCRIPT_PATH}/*.tga "${GAME_PATH}/uifiles/${UI_NAME}/" -UI_FILES=( $( find . -name '*.diff' -exec basename {} .diff \; )) +mkdir -vp "${UI_FOLDER}" +cp ${SCRIPT_PATH}/*.tga "${UI_FOLDER}/" + +# Build an array of all diffs to patch, stripping the extension +UI_FILES=( $( find "${SCRIPT_PATH}" -name '*.diff' -exec basename {} .diff \; )) for UI_FILE in "${UI_FILES[@]}" do