mirror of
https://github.com/the-sane/lug-helper.git
synced 2024-12-28 17:04:22 +00:00
adapted rm_shaders() to the new appdata-location used with 3.17
This commit is contained in:
parent
f072378617
commit
eb48d00396
@ -103,8 +103,7 @@ live_dir="LIVE"
|
|||||||
ptu_dir="PTU"
|
ptu_dir="PTU"
|
||||||
|
|
||||||
# AppData directory
|
# AppData directory
|
||||||
appdata_path="drive_c/users?/appdata?/something/local/idontknow/starcitizen"
|
appdata_path="drive_c/users/$USER/AppData/Local/Star Citizen"
|
||||||
|
|
||||||
# Remaining directory paths are set at the end of the getdirs() function
|
# Remaining directory paths are set at the end of the getdirs() function
|
||||||
|
|
||||||
######## Runners ###########################################################
|
######## Runners ###########################################################
|
||||||
@ -1507,19 +1506,26 @@ rm_shaders() {
|
|||||||
# User cancelled and wants to return to the main menu, or error
|
# User cancelled and wants to return to the main menu, or error
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Create an array containing all directories in the appdata_path
|
||||||
|
for appdata_list in "$wine_prefix/$appdata_path"/*; do
|
||||||
|
if [ -d "$appdata_list" ]; then
|
||||||
|
appdata_items+=("$appdata_list")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
# Sanity check
|
# Delete shaders directory in every directory beginning with "sc-alpha"
|
||||||
if [ ! -d "$shaders_dir" ]; then
|
for (( i=0; i<"${#appdata_items[@]}"; i++ )); do
|
||||||
message warning "Shaders directory not found. There is nothing to delete!\n\n$shaders_dir"
|
if [[ ${appdata_items[i]} = "$wine_prefix/$appdata_path"/sc-alpha* ]]; then # check if the item in the array begins with sc-alpha
|
||||||
return 0
|
if [ -d "${appdata_items[i]}/shaders" ]; then # check if there is a shaders subfolder
|
||||||
fi
|
if message question "The following directory will be deleted:\n\n${appdata_items[i]}/shaders\n\nDo you want to proceed?"; then
|
||||||
|
debug_print continue "Deleting ${appdata_items[i]}/shaders..."
|
||||||
# Delete the shader directory
|
rm -r "${appdata_items[i]}/shaders"
|
||||||
if message question "The following directory will be deleted:\n\n$shaders_dir\n\nDo you want to proceed?"; then
|
message info "Your shaders have been deleted!"
|
||||||
debug_print continue "Deleting $shaders_dir..."
|
fi
|
||||||
rm -r "$shaders_dir"
|
fi
|
||||||
message info "Your shaders have been deleted!"
|
fi
|
||||||
fi
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
# Delete DXVK cache
|
# Delete DXVK cache
|
||||||
|
Loading…
Reference in New Issue
Block a user