1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/bash
# Author: PortWINE-Linux.ru
if [ ! -f "${config_path}/${portname}_ver" ]
then
echo "10" > "${config_path}/${portname}_ver"
fi
if [ ! -f "${config_path}/update_notifier" ]
then
echo "1" > "${config_path}/update_notifier"
fi
read "update_not" < "${config_path}/update_notifier"
if [ "${update_not}" -eq "1" ]
then
wget -T 2 --output-document="${config_path}/${portname}_cur_ver" "http://portwine-linux.ru/current_version/${portname}_ver"
sleep 1
if [ -f "${config_path}/${portname}_ver" ]
then
read current_ver < "${config_path}/${portname}_cur_ver"
read install_ver < "${config_path}/${portname}_ver"
rm -f "${config_path}/${portname}_cur_ver"
if [ "${current_ver}" -gt "${install_ver}" ]
then
xsd=`zenity --title "${port_upd1}" --text "${port_upd2}" --list --radiolist --height=220 --column="${inst_set}" --column "${port_upd3}" \
TRUE "${port_upd4}" \
FALSE "${port_upd5}" \
FALSE "${port_upd6}" `
case $xsd in
"${port_upd4}")
$WINESERVER -k
xdg-open $porturl
exit 0 ;;
"${port_upd5}")
echo " " ;;
"${port_upd6}")
echo "0" > "${config_path}/update_notifier" ;;
esac
fi
fi
fi
########################################################################
if [ ! -f "${HOME}/.config/.PortTime" ]
then
echo "10" > "${HOME}/.config/.PortTime"
fi
read "port_time" < "${HOME}/.config/.PortTime"
if [ "${port_time}" -gt "1" ]
then
port_time=$((${port_time}-1))
echo "${port_time}" > "${HOME}/.config/.PortTime"
else
xsd2=`zenity --title "${port_time1}" --text "${port_time2}" --list --radiolist --height=240 --column="${inst_set3}" --column "${port_time3}" \
TRUE "${port_time4}" \
FALSE "${port_time5}" \
FALSE "${port_time6}" `
if [ $? -eq 1 ]
then
echo "1" > "${HOME}/.config/.PortTime"
else
case $xsd2 in
"${port_time4}")
if [ ! -z "$(command -v sensible-browser)" ]; then
sensible-browser "$urlg" &
elif [ ! -z "$(command -v xdg-open)" ]; then
xdg-open "$urlg" &
elif [ ! -z "$(command -v gnome-open)" ]; then
gnome-open "$urlg" &
elif [ ! -z "$(command -v python)" ]; then
python -m webbrowser "$urlg"
fi &
echo "150" > "${HOME}/.config/.PortTime"
sleep 5 ;;
"${port_time5}")
echo "30" > "${HOME}/.config/.PortTime" ;;
"${port_time6}")
echo "80" > "${HOME}/.config/.PortTime" ;;
esac
fi
fi