script optimized

This commit is contained in:
victor 2020-02-11 22:40:30 +03:30
parent a86c427966
commit 8abcaf8e77
1 changed files with 16 additions and 10 deletions

View File

@ -38,15 +38,22 @@ main(){
echo -e "\033[1;93mplease allow mono and gecko packages to be installed automatically\e[0m"
echo -e "\033[1;93mif they're not already installed then click on OK button\e[0m"
winecfg 2> "$SCR_PATH/wine-error.log"
if [ $? -eq 0 ];then
show_message "prefix configured..."
sleep 5
else
error "prefix config failed :("
fi
if [ -f "$WINE_PREFIX/user.reg" ];then
#add necessary dlls
append_DLL
sleep 4
#add dark mod
set_dark_mod
else
error "user.reg Not Found :("
fi
}
@ -110,7 +117,6 @@ set_dark_mod(){
echo "$i" >> "$WINE_PREFIX/user.reg"
done
show_message "set dark mode for wine..."
sleep 3
unset colorarray
}
@ -150,7 +156,7 @@ append_DLL(){
for i in ${dllarray[@]};do
echo "$i" >> "$WINE_PREFIX/user.reg"
done
sleep 4
unset dllarray
}
export_var(){