~mmach/netext73/trunk

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
#!/bin/bash
## Graficzny instalator kerneli e X t 7 3  - NeteXt'73
## przygotowanie kerneli e X t 7 3 - ext73@wp.pl
## przygotowanie skryptów optymalizacyjnych e X t 7 3
## autor skryptu NeteXt'73 - NetBit73 - netbit73@gmail.com
## Licencja: GPL v3: https://www.gnu.org/licenses/gpl.txt
#########################################################################################################################################################################
#procedury

source /opt/NeteXt73/procedury

#########################################################################################################################################################################

cd /tmp/netext73

if [ "$1" = "paypal" ]; then
	yad --center --html --on-top --browser --title="We will help you, you will help us. Thank You for Your donation. NeteXt Team." --window-icon="/opt/NeteXt73/ikony/paypal.png" --uri="https://paypal.me/pools/c/812kApofG0" --width=$((860*$skala))  --height=$((600*$skala))
elif [ "$1" = "ext73" ]; then
	yad --center --html --on-top --browser --title="e X t 7 3" --window-icon="/opt/NeteXt73/ikony/ext73.png" --uri="http://www.netext73.pl/2014/02/e-x-t-7-3.html" --width=$((860*$skala)) --height=$((600*$skala))
elif [ "$1" = "netbit73" ]; then
	yad --center --html --on-top --browser --title="NetBit73" --window-icon="/opt/NeteXt73/ikony/netbit73.png" --uri="http://www.netext73.pl/2014/01/netbit73.html" --width=$((860*$skala)) --height=$((600*$skala))
elif [ "$1" = "kontakty" ]; then
	KEY="$(echo $RANDOM)"
	#zmienne losowe
	for i in $(seq 0 6); do
		res[$i]=$(mktemp --tmpdir=/tmp/netext73 netext73_$i.XXXXXXXX)
	done
	if  [ "$(cat /tmp/netext73/sumy/stable.txt)" = "" ]; then
		stable="$TEXT_BRAK_DANYCH"
		nr=""
	else
		stable="$(cat /tmp/netext73/sumy/stable.txt | grep tar.xz | head -n 1 | cut -d '-' -f 2 | sed 's/.tar.*//')"
		nr="$stable"
	fi
	yad --plug=$KEY --tabnum=1 --text="$TEXT_O_PROGRAMIE" 1> ${res[0]} &
	yad --plug=$KEY --tabnum=2 --icons --image-on-top --single-click --item-width=$((330*$skala)) --read-dir=/opt/NeteXt73/kontakty 1> ${res[1]} &
	yad --plug=$KEY --tabnum=3 --text-info --filename=/opt/NeteXt73/LICENSE 1> ${res[2]} &
	yad --plug=$KEY --tabnum=4 --text-info --filename=/opt/NeteXt73/changelog 1> ${res[3]} &
	if [ "$stable" != "$TEXT_BRAK_DANYCH" ]; then
		if [[ $nr =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]];then		
			yad --plug=$KEY --tabnum=5 --text-info --filename="/tmp/netext73/sumy/ChangeLog-$stable" --browser 1> ${res[4]} &
		else
			yad --plug=$KEY --tabnum=5 --html --uri="https://www.kernel.org" --browse 1> ${res[4]} &
		fi
	fi
#	yad --plug=$KEY --tabnum=6 --form --field="$TEXT_UZYTKOWNIK:RO" "$userek2" --field="$TEXT_CEL_KONTAKTU:CB" "$TEXT_CELE_KONTAKTU"  --field="e-mail" "$EMAIL" --field="$TEXT_TRESC_ZGLOSZENIA:TXT" --field="$TEXT_OCZEKUJE_ODPOWIEDZI:CHK" "$ODP" 1> ${res[5]} &
	
	yad --notebook --center --key=$KEY --tab-pos="left" --tab="$TEXT_O" --tab="$TEXT_KONTAKT_Z_AUTORAMI" --tab="$TEXT_LICENCJA" --tab="$TEXT_CHANGELOG" --tab="Changelog $stable"  \
	--title="$nazwa_skryptu1 " --window-icon="/opt/NeteXt73/ikony/NeteXt73.png" --on-top --width=$((860*$skala)) --height=$((500*$skala)) --button="$TEXT_ZAMKNIJ:1" # --button="$TEXT_WYSLIJ_ZGLOSZENIE:0" --tab="$TEXT_BUG"
	klawisz=$?
	if [ "$klawisz" = "0" ]; then
		#wycinanie błędów
		if [ "$(cat ${res[5]} | cut -d '|' -f 4 )" != "" ]; then
			please_wait
			export userek=$(cat /tmp/netext73/userek)
			echo -e "$(cat ${res[5]} | cut -d '|' -f 3) \n $(cat ${res[5]} | cut -d '|' -f 5) \n $(cat ${res[5]} | cut -d '|' -f 4)"  | pastebinit_netext73 "$(cat ${res[5]} | cut -d "|" -f 2)" && dymek -i $ikona_info1 "$TEXT_INFORMACJA" "\n$TEXT_WYSLANO_ZGLOSZENIE"
			please_wait kill
		fi
	fi
	for i in $(seq 0 6); do
		rm ${res[$i]} -f
	done
else
	yad --center --html --browser --title="$adres_opisu" --window-icon="/opt/NeteXt73/ikony/NeteXt73.png"  --uri="$adres_opisu" --width=$((950*$skala)) --height=$((600*$skala))
fi