mirror of
https://github.com/the-sane/lug-helper.git
synced 2024-12-29 06:54:18 +00:00
simplified if statement for shader removal
This commit is contained in:
parent
dd81f24be3
commit
b4d9598fe5
@ -1516,15 +1516,11 @@ rm_shaders() {
|
|||||||
|
|
||||||
# Delete shaders directory in every directory beginning with "sc-alpha"
|
# Delete shaders directory in every directory beginning with "sc-alpha"
|
||||||
for (( i=0; i<"${#appdata_items[@]}"; i++ )); do
|
for (( i=0; i<"${#appdata_items[@]}"; i++ )); do
|
||||||
if [ "${appdata_items[i]}" = "$wine_prefix/$appdata_path"/sc-alpha* ]; then # check if the item in the array begins with sc-alpha
|
if [ "${appdata_items[i]}" = "$wine_prefix/$appdata_path"/sc-alpha* ] && [ -d "${appdata_items[i]}"/shaders ]; then # check if the item in the array begins with sc-alpha
|
||||||
if [ -d "${appdata_items[i]}/shaders" ]; then # check if there is a shaders subfolder
|
if message question "The following directory will be deleted:\n\n${appdata_items[i]}/shaders\n\nDo you want to proceed?"; then
|
||||||
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..."
|
debug_print continue "Deleting ${appdata_items[i]}/shaders..."
|
||||||
rm -r "${appdata_items[i]}/shaders"
|
rm -r "${appdata_items[i]}/shaders"
|
||||||
message info "Your shaders have been deleted!"
|
message info "Your shaders have been deleted!"
|
||||||
fi
|
|
||||||
elif [ $i = $(( "${#appdata_items[@]}" - 1 )) ]; then # display message when end of array is reached and no shaders directories were found
|
|
||||||
message info "No more shader directories found"
|
|
||||||
fi
|
fi
|
||||||
elif [ $i = $(( "${#appdata_items[@]}" - 1 )) ]; then # display message when end of array is reached and no shaders or sc-alpha directories were found
|
elif [ $i = $(( "${#appdata_items[@]}" - 1 )) ]; then # display message when end of array is reached and no shaders or sc-alpha directories were found
|
||||||
message info "No more shader directories found"
|
message info "No more shader directories found"
|
||||||
|
Loading…
Reference in New Issue
Block a user