From 57ced2168a0e203468ada3d99050acadd133e436 Mon Sep 17 00:00:00 2001 From: wheaney <42350981+wheaney@users.noreply.github.com> Date: Thu, 29 Aug 2024 20:55:13 -0700 Subject: [PATCH] Fix issues with setup and uninstall scripts from the move to XDG files --- vulkan/bin/breezy_vulkan_uninstall | 31 ++---------------------------- vulkan/bin/setup | 4 ++++ 2 files changed, 6 insertions(+), 29 deletions(-) diff --git a/vulkan/bin/breezy_vulkan_uninstall b/vulkan/bin/breezy_vulkan_uninstall index 2871771..adc84a7 100755 --- a/vulkan/bin/breezy_vulkan_uninstall +++ b/vulkan/bin/breezy_vulkan_uninstall @@ -24,47 +24,20 @@ USER_HOME=$(getent passwd $USER | cut -d: -f6) if [ -z "$XDG_DATA_HOME" ]; then XDG_DATA_HOME="$USER_HOME/.local/share" fi -DATA_DIR="$XDG_DATA_HOME/breezy_vulkan" -if [ ! -d "$DATA_DIR" ]; then - mkdir -p $DATA_DIR -fi VULKAN_DATA_DIR="$XDG_DATA_HOME/vulkan" -XR_DRIVER_DATA_DIR="$XDG_DATA_HOME/breezy_vulkan" if [ -z "$XDG_CONFIG_HOME" ]; then XDG_CONFIG_HOME="$USER_HOME/.config" fi -CONFIG_DIR="$XDG_CONFIG_HOME/breezy_vulkan" -if [ ! -d "$CONFIG_DIR" ]; then - mkdir -p $CONFIG_DIR -fi if [ -z "$XDG_BIN_HOME" ]; then XDG_BIN_HOME="$USER_HOME/.local/bin" fi OLD_BIN_DIR="$USER_HOME/bin" BIN_DIR="$XDG_BIN_HOME" -if [ ! -d "$BIN_DIR" ]; then - mkdir -p $BIN_DIR -fi - -if [ -z "$XDG_STATE_HOME" ]; then - XDG_STATE_HOME="$USER_HOME/.local/state" -fi -STATE_DIR="$XDG_STATE_HOME/breezy_vulkan" -if [ ! -d "$STATE_DIR" ]; then - mkdir -p $STATE_DIR -fi LIB_DIR="$USER_HOME/.local/lib" -if [ ! -d "$LIB_DIR" ]; then - mkdir -p "$LIB_DIR" -fi - LIB32_DIR="$USER_HOME/.local/lib32" -if [ ! -d "$LIB32_DIR" ]; then - mkdir -p "$LIB32_DIR" -fi if [ "$for_install" -eq 0 ]; then UA_EVENT_NAME="breezy_uninstall" @@ -81,8 +54,8 @@ rm $VULKAN_DATA_DIR/implicit_layer.d/vkBasalt.json rm $VULKAN_DATA_DIR/implicit_layer.d/vkBasalt.x86.json [ "$for_install" -eq 0 ] && echo "Removing vkBasalt and reshade directories at $CONFIG_DIR/" -rm -rf $CONFIG_DIR/vkBasalt -rm -rf $CONFIG_DIR/reshade +rm -rf $XDG_CONFIG_HOME/vkBasalt +rm -rf $XDG_CONFIG_HOME/reshade [ "$for_install" -eq 0 ] && echo "Removing scripts at $BIN_DIR" rm -f $BIN_DIR/breezy_vulkan_verify diff --git a/vulkan/bin/setup b/vulkan/bin/setup index ab5bac4..116c03f 100755 --- a/vulkan/bin/setup +++ b/vulkan/bin/setup @@ -99,6 +99,9 @@ cp bin/breezy_vulkan_verify $BIN_DIR cp manifest $DATA_DIR # keep putting this in the old location in case an older version of the script tries to find it +if [ ! -d "$OLD_BIN_DIR" ]; then + mkdir -p $OLD_BIN_DIR +fi cp bin/breezy_vulkan_uninstall $OLD_BIN_DIR echo "Installing vkBasalt; copying binaries, configs, and shader files" @@ -137,6 +140,7 @@ chown -R $USER:$GROUP $RESHADE_CONFIG_DIR chown -R $USER:$GROUP $VKBASALT_CONFIG_DIR chown -R $USER:$GROUP $STATE_DIR chown -R $USER:$GROUP $BIN_DIR/breezy_vulkan_* +chown -R $USER:$GROUP $OLD_BIN_DIR # clear bash's cache of executable locations, so it can find the newly installed scripts hash -r