diff --git a/files/builds/development-branch/uninstall.sh b/files/builds/development-branch/uninstall.sh index 59a4228..0e4e4b3 100644 --- a/files/builds/development-branch/uninstall.sh +++ b/files/builds/development-branch/uninstall.sh @@ -7,7 +7,7 @@ # Author URI: https://cryinkfly.com # # License: MIT # # Copyright (c) 2020-2022 # -# Time/Date: 10:50/23.05.2022 # +# Time/Date: 12:40/23.05.2022 # # Version: 0.7 -> 0.8 # ################################################################################ @@ -17,11 +17,59 @@ # THE INITIALIZATION OF DEPENDENCIES STARTS HERE: # ############################################################################################################################################################### -# Get a file where the user can see the exits Wineprefixes of Autodesk Fusion 360 on the system. +# Default-Path: +DL_PATH="$HOME/.fusion360" -function DL_WINEPREFIXES_LIST { - DL_WINEPREFIXES_STRING=$(yad --height=300 --separator="" --list --radiolist --column=SELECT --column=WINEPREFIXES < /tmp/fusion360/logs/wineprefixes.log) - DL_WINEPREFIXES=${DL_WINEPREFIXES_STRING/#TRUE} +############################################################################################################################################################### + +# Copy the file where the user can see the exits Wineprefixes of Autodesk Fusion 360 on the system. +function DL_GET_FILES { + mkdir -p "/tmp/fusion360/logs" + cp "$HOME/.fusion360/logs/wineprefixes.log" "/tmp/fusion360/logs" + cp "$HOME/.fusion360/config/settings.txt" "/tmp/fusion360/config" +} + +############################################################################################################################################################### + +function DL_LOAD_LOCALE { +DL_LOCALE=`cat /tmp/fusion360/settings.txt | awk 'NR == 1'` +if [[ $DL_LOCALE = "Czech" ]]; then + echo "CS" + . $DL_PATH/locale/cs-CZ/locale-cs.sh +elif [[ $DL_LOCALE = "English" ]]; then + echo "EN" + . $DL_PATH/locale/en-US/locale-en.sh +elif [[ $DL_LOCALE = "German" ]]; then + echo "DE" + . $DL_PATH/locale/de-DE/locale-de.sh +elif [[ $DL_LOCALE = "Spanish" ]]; then + echo "ES" + . $DL_PATH0/locale/es-ES/locale-es.sh +elif [[ $DL_LOCALE = "French" ]]; then + echo "FR" + . $DL_PATH/locale/fr-FR/locale-fr.sh +elif [[ $DL_LOCALE = "Italian" ]]; then + echo "IT" + . $DL_PATH/locale/it-IT/locale-it.sh +elif [[ $DL_LOCALE = "Japanese" ]]; then + echo "JP" + . $DL_PATH/locale/ja-JP/locale-ja.sh +elif [[ $DL_LOCALE = "Korean" ]]; then + echo "KO" + . $DL_PATH/locale/ko-KR/locale-ko.sh +elif [[ $DL_LOCALE = "Chinese" ]]; then + echo "ZH" + . $DL_PATH/locale/zh-CN/locale-zh.sh +else + echo "EN" + . $DL_PATH/locale/en-US/locale-en.sh +fi +} + +############################################################################################################################################################### + +function DL_WINEPREFIXES_DEL { +DL_WINEPREFIXES=${DL_WINEPREFIXES_STRING/#TRUE} DL_WINEPREFIXES_VAR_1=`grep -n "$DL_WINEPREFIXES" /tmp/fusion360/logs/wineprefixes.log | grep -Eo '^[^:]+'` DL_WINEPREFIXES_VAR_2=1 DL_WINEPREFIXES_VAR_SUM=`echo $(( var1 - var2 ))` @@ -39,4 +87,22 @@ function DL_WINEPREFIXES_LIST { # else # rmdir $HOME/.fusion360 # fi + } + +############################################################################################################################################################### +# ALL DIALOGS ARE ARRANGED HERE: # +############################################################################################################################################################### + +function DL_WINEPREFIXES_LIST { + DL_WINEPREFIXES_STRING=$(yad --height=300 --separator="" --list --radiolist --column=SELECT --column=WINEPREFIXES < /tmp/fusion360/logs/wineprefixes.log) + DL_WINEPREFIXES_DEL +} + +############################################################################################################################################################### +# THE INSTALLATION PROGRAM IS STARTED HERE: # +############################################################################################################################################################### + +DL_GET_FILES +DL_LOAD_LOCALE +DL_WINEPREFIXES_LIST