mirror of
https://github.com/shvedes/photoshop-linux.git
synced 2025-09-10 13:15:07 +00:00
Refactored is_path_exists
function
This commit is contained in:
parent
e6282cbb61
commit
c1f873a4d1
17
install.sh
17
install.sh
@ -152,23 +152,22 @@ install_deps() {
|
|||||||
#
|
#
|
||||||
|
|
||||||
is_path_exists() {
|
is_path_exists() {
|
||||||
if [ -d "$1" ]; then
|
if ! [ -d "$1" ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
# BUG
|
# BUG
|
||||||
# echo -e "$WARNING The specified path '$1' already exists."
|
# echo -e "$WARNING The specified path '$1' already exists."
|
||||||
echo -e "$WARNING The specified path '${YELLOW}${1}${RESET}' already exists."
|
echo -e "$WARNING The specified path '${YELLOW}${1}${RESET}' already exists."
|
||||||
|
|
||||||
if ask_user "Do you want to ${RED}delete${RESET} previous installation?"; then
|
if ! ask_user "Do you want to ${RED}delete${RESET} previous installation?"; then
|
||||||
if rm -rfv "${1:?}" 2>>./install_log.log; then
|
|
||||||
echo -e "$LOG Deleted old installation."
|
|
||||||
else
|
|
||||||
echo -e "$ERROR Something went wrong."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo -e "$LOG Exiting."
|
echo -e "$LOG Exiting."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! rm -rfv "${1:?}" 2>>./install_log.log; then
|
||||||
|
print_err "Something went wrong."
|
||||||
fi
|
fi
|
||||||
|
echo -e "$LOG Deleted old installation."
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_wine() {
|
setup_wine() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user