summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathon Fernyhough2021-09-16 19:41:59 +0100
committerJonathon Fernyhough2021-09-16 19:41:59 +0100
commit797a4f9363871f7a77a2879cfd7f5839be62bc48 (patch)
tree643f46ce3f1161c88b4c430154857a0eda273762
parent7c4c32453599d6b94c6e7ed3f3b65fa5b017668d (diff)
downloadaur-797a4f9363871f7a77a2879cfd7f5839be62bc48.tar.gz
Merge with upstream PKGBUILD
-rw-r--r--.SRCINFO29
-rw-r--r--PKGBUILD43
-rw-r--r--README.md3
-rw-r--r--reflector-simple444
-rw-r--r--reflector-simple.desktop15
5 files changed, 53 insertions, 481 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c243718d9745..00439eac9776 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,20 +1,29 @@
pkgbase = reflector-simple
pkgdesc = Simple GUI wrapper for 'reflector'.
- pkgver = 1.5
+ pkgver = 2021.08.17
pkgrel = 1
- url = https://github.com/endeavouros-team/PKGBUILDS/raw/master/reflector-simple
+ url = https://github.com/endeavouros-team/PKGBUILDS
arch = any
license = GPL
- depends = bash
- depends = yad
depends = reflector
depends = whois
depends = geoip
- depends = bind
- source = reflector-simple
- source = reflector-simple.desktop
- sha512sums = 788319605396818f4932cb04ad4faf1fcff4a5fee87f0f78a507f6960f393dc7eca635fd95655f18c1de72ae5cac4e3894bb089f024fc2271cee3bedad0d44ba
- sha512sums = 2def334909a5bbe3c6f82043f62a0f3f3c6747b7813ad9154f43e70c303301e079f8e81ea41b306f1b6f8a8e37afd535686b2e4642fb6b9357d97a7fad1e0d0a
+ depends = bind-tools
+ depends = eos-bash-shared
+ optdepends = reflector-bash-completion: useful for plain reflector usage
+ backup = etc/reflector-simple.conf
+ backup = etc/reflector-simple-tool.conf
+ source = https://github.com/endeavouros-team/PKGBUILDS/raw/a4727ec460b22a0853de4245a9d09f9f955ae969/reflector-simple
+ source = https://github.com/endeavouros-team/PKGBUILDS/raw/a4727ec460b22a0853de4245a9d09f9f955ae969/reflector-simple.desktop
+ source = https://github.com/endeavouros-team/PKGBUILDS/raw/a4727ec460b22a0853de4245a9d09f9f955ae969/reflector-simple.conf
+ source = https://github.com/endeavouros-team/PKGBUILDS/raw/a4727ec460b22a0853de4245a9d09f9f955ae969/reflector-simple-tool.conf
+ source = https://github.com/endeavouros-team/PKGBUILDS/raw/a4727ec460b22a0853de4245a9d09f9f955ae969/mirrorlist-rank-info
+ source = https://github.com/endeavouros-team/PKGBUILDS/raw/a4727ec460b22a0853de4245a9d09f9f955ae969/eos-latest-arch-mirrorlist
+ sha512sums = 1637cf77f63cee0706f2f8774f32a8fe40d944915e46aeee7f0426d77b149f7dbd6477abfeac3b47e2d69a677a30dac19c71aa834d7543a913686a1bf77cc5e2
+ sha512sums = 3435d083e8df72f17a291cca4c3cc62ac7824d1f528e746bf689f8962159fbdd97b6a57d45b3b379a2191e2e49536b77040b13d704a58753fbed00017f4403d0
+ sha512sums = aa149c8fc273e6a9fb5ddc38bde8a37b8fb095ec8877a324b957be57e156ef583adbed5988f0184ef06d5d09ec13e01e4a58b81fffef5d6d316405a3881895c3
+ sha512sums = 8b101caac9f38238d30f293176a09f1bb483ec1cdc474ef126ec087a8b548b50eee5c35617f0616dd1618e4dce72e14b70270f47658577e20e04a133405510aa
+ sha512sums = c56090338b01f6eb251e3250d69d32c2b96c8393ebe921896de3ad1bd5c622c01ae637a09c6d0d0aa40e71d55be608a8d77066be05929d586723e79e0f24002c
+ sha512sums = ceac82fa40741acaba6e7bf9aa0de869ab19a1f166b2ac298521e731de4201291a5cc238024e5eb74a85a9014e65b936dccd265d4a5196d7722cbe891c0f6bff
pkgname = reflector-simple
-
diff --git a/PKGBUILD b/PKGBUILD
index b97dc37f225b..d9e783ecad79 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,29 +2,54 @@
pkgname=reflector-simple
pkgdesc="Simple GUI wrapper for 'reflector'."
-pkgver=1.5
+pkgver=2021.08.17
pkgrel=1
arch=('any')
license=('GPL')
depends=(
- bash yad reflector whois geoip bind
+ reflector whois geoip bind-tools
+ eos-bash-shared
+)
+optdepends=(
+ 'reflector-bash-completion: useful for plain reflector usage'
+)
+backup=(
+ etc/$pkgname.conf
+ etc/$pkgname-tool.conf
)
-url="https://github.com/endeavouros-team/PKGBUILDS/raw/master/$pkgname"
+url=https://github.com/endeavouros-team/PKGBUILDS
+_commit=a4727ec460b22a0853de4245a9d09f9f955ae969
source=(
- $pkgname
- $pkgname.desktop
+ $url/raw/$_commit/$pkgname
+ $url/raw/$_commit/$pkgname.desktop
+ $url/raw/$_commit/$pkgname.conf
+ $url/raw/$_commit/$pkgname-tool.conf
+ $url/raw/$_commit/mirrorlist-rank-info
+ $url/raw/$_commit/eos-latest-arch-mirrorlist
)
-sha512sums=('788319605396818f4932cb04ad4faf1fcff4a5fee87f0f78a507f6960f393dc7eca635fd95655f18c1de72ae5cac4e3894bb089f024fc2271cee3bedad0d44ba'
- '2def334909a5bbe3c6f82043f62a0f3f3c6747b7813ad9154f43e70c303301e079f8e81ea41b306f1b6f8a8e37afd535686b2e4642fb6b9357d97a7fad1e0d0a')
+sha512sums=('1637cf77f63cee0706f2f8774f32a8fe40d944915e46aeee7f0426d77b149f7dbd6477abfeac3b47e2d69a677a30dac19c71aa834d7543a913686a1bf77cc5e2'
+ '3435d083e8df72f17a291cca4c3cc62ac7824d1f528e746bf689f8962159fbdd97b6a57d45b3b379a2191e2e49536b77040b13d704a58753fbed00017f4403d0'
+ 'aa149c8fc273e6a9fb5ddc38bde8a37b8fb095ec8877a324b957be57e156ef583adbed5988f0184ef06d5d09ec13e01e4a58b81fffef5d6d316405a3881895c3'
+ '8b101caac9f38238d30f293176a09f1bb483ec1cdc474ef126ec087a8b548b50eee5c35617f0616dd1618e4dce72e14b70270f47658577e20e04a133405510aa'
+ 'c56090338b01f6eb251e3250d69d32c2b96c8393ebe921896de3ad1bd5c622c01ae637a09c6d0d0aa40e71d55be608a8d77066be05929d586723e79e0f24002c'
+ 'ceac82fa40741acaba6e7bf9aa0de869ab19a1f166b2ac298521e731de4201291a5cc238024e5eb74a85a9014e65b936dccd265d4a5196d7722cbe891c0f6bff')
package() {
cd $srcdir
+ sed -i $pkgname -e "s|local VERSION_INFO=.*$|local VERSION_INFO=$pkgver-$pkgrel|"
+
install -d $pkgdir/usr/bin
+ install -d $pkgdir/etc
install -d $pkgdir/usr/share/applications
- install -Dm755 $pkgname $pkgdir/usr/bin/$pkgname
- install -Dm644 $pkgname.desktop $pkgdir/usr/share/applications/$pkgname.desktop
+ install -Dm755 $pkgname $pkgdir/usr/bin/$pkgname
+ install -Dm755 eos-latest-arch-mirrorlist $pkgdir/usr/bin/eos-latest-arch-mirrorlist
+ install -Dm755 mirrorlist-rank-info $pkgdir/usr/bin/mirrorlist-rank-info
+
+ install -Dm644 $pkgname.conf $pkgdir/etc/$pkgname.conf
+ install -Dm644 $pkgname-tool.conf $pkgdir/etc/$pkgname-tool.conf
+ install -Dm644 $pkgname.desktop $pkgdir/usr/share/applications/$pkgname.desktop
}
diff --git a/README.md b/README.md
deleted file mode 100644
index 2aeed3baed9a..000000000000
--- a/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# reflector-simple
-
-PKGBUILD for reflector-simple \ No newline at end of file
diff --git a/reflector-simple b/reflector-simple
deleted file mode 100644
index 1e8da13e69df..000000000000
--- a/reflector-simple
+++ /dev/null
@@ -1,444 +0,0 @@
-#!/bin/bash
-#
-# Select pacman mirrors with a simple GUI.
-#
-
-eos_yad() {
- local icon=update
- GDK_BACKEND=x11 /usr/bin/yad --window-icon=$icon "$@"
-}
-
-REFLECTOR_COUNTRIES="$(echo "Worldwide WW 0" ; reflector --list-countries)"
-
-CodeToCountry() { # convert country code to country name
- local code="$1"
- echo "$REFLECTOR_COUNTRIES" | grep -w "$code" | sed 's|^\(.*[a-z]\)[ ]*[A-Z][A-Z].*$|\1|'
-}
-CountryToCode() { # convert country name to country code
- local country="$1"
- echo "$REFLECTOR_COUNTRIES" | grep -w "$country" | awk '{print $(NF-1)}'
-}
-
-
-CCCheck() { # check validity of country code
- case "$1" in
- [A-Z][A-Z]) test -n "$(CodeToCountry "$1")" && return 0 ;;
- esac
- return 1 # fail
-}
-
-GetYourCountryCode() {
- local IP code
-
- IP="$(dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com | tr -d '"')" # ipv4 address
- code="$(geoiplookup "$IP" | sed 's|^.*: \([A-Z][A-Z]\),.*$|\1|')"
- CCCheck "$code" && {
- echo "$code" ; return
- }
- code="$(whois "$IP" | grep ^country: | awk '{print $NF}')"
- CCCheck "$code" && {
- echo "$code" ; return
- }
-
- IP="$(dig -6 TXT +short o-o.myaddr.l.google.com @ns1.google.com | tr -d '"')" # ipv6 address
- code="$(geoiplookup6 "$IP" | sed 's|^.*: \([A-Z][A-Z]\),.*$|\1|')"
- CCCheck "$code" && {
- echo "$code" ; return
- }
- code="$(whois "$IP" | grep ^country: | awk '{print $NF}')"
- CCCheck "$code" && {
- echo "$code" ; return
- }
-
- code="$(curl -s https://ipinfo.io/country)"
- CCCheck "$code" && {
- echo "$code" ; return
- }
-
- # net services failed, use local variables, but may be wrong
- code="$(locale | grep ^LC_TIME | cut -d '"' -f 2 | sed 's|^.*_\([A-Z][A-Z]\)\..*$|\1|')"
- CCCheck "$code" && {
- echo "$code" ; return
- }
-}
-
-ArgsYesNo() {
- local searched="$1"
- shift
- for xx in "$@" ; do
- test "$xx" = "$searched" && { echo "yes" ; return ; }
- done
- echo "no"
-}
-
-IsDroppedCountry() {
- local xx
- for xx in "${conf_dropped_countries[@]}" ; do
- [ "$xx" = "$1" ] && return 0
- done
- return 1
-}
-
-_config_country() {
- local xx="$1"
- case "$xx" in
- [A-Z][A-Z]) conf_selected_countries+=("$(CodeToCountry "$xx")") ;;
- esac
-}
-
-
-# Conf limitations:
-# * protocols: comma separated list not supported
-
-_get_reflector_x_configs() {
- # Read reflector options from $REFLECTOR_X_CONF,
- # convert country names to country codes, and put all options
- # into file '$tmpconf'.
- local name code ix
-
- if [ ! -r "$REFLECTOR_X_CONF" ] ; then
- return
- fi
-
- cat $REFLECTOR_X_CONF | grep -P -v "^[ \t]*#|^$" > $tmpconf
-
- for ((ix=0; ix<${#countrycodes[@]}; ix++)) ; do
- name="${countrynames[$ix]}"
- #if [ "${name% *}" != "$name" ] ; then # $name contains space(s)
- code="${countrycodes[$ix]}"
- sed -i $tmpconf \
- -e "s|'$name'|$code|g" \
- -e "s|\"$name\"|$code|g" \
- -e 's|'"$name"'|'$code'|g' # country name without quotes!
- #fi
- done
-
- local xx list yy opt=""
- for xx in $(cat $tmpconf) ; do
- # split single letter option from its value
- case "$xx" in
- -p?* | -c?* | -a?* | -n?*)
- opt="${xx::2}"
- xx="${xx:2}"
- ;;
- esac
-
- case "$opt" in
- --sort) conf_sort="$xx" ;;
- -a | --age) conf_age="$xx" ;;
- -n | --number) conf_number="$xx" ;;
- -p | --protocol) conf_protocol+=("$xx") ;;
- $country_exclude) # extension
- conf_dropped_countries+=("$xx")
- conf_dropped_countries+=("$(CodeToCountry "$xx")")
- ;;
- -c | --country)
- # list or single value: "GB,FR,DE" or "GB"
- # for a country spec, separate country names if $xx is a country list
- if [ "$(echo "$xx" | tr -d ',')" != "$xx" ] ; then # is it a list?
- # yes, a list of countries
- list="$xx"
- while [ -n "$list" ] ; do
- yy="$(echo "$list" | cut -d ',' -f 1)"
- list="$(echo "$list" | sed 's|^[^,]*,||')"
- [ "$list" = "$yy" ] && list=""
- _config_country "$yy"
- done
- else
- # no, only one country
- _config_country "$xx"
- fi
- ;;
- esac
- opt="$xx"
- done
-
- local zz=()
- for xx in "${conf_selected_countries[@]}" ; do
- IsDroppedCountry "$xx" || zz+=("$(CodeToCountry "$xx")")
- done
- conf_selected_countries=("${zz[@]}")
-}
-
-IsInSelectedCountries() {
- local cname="$1"
- local xx
- for xx in "${conf_selected_countries[@]}" ; do
- [ "$xx" = "$cname" ] && return 0
- done
- return 1
-}
-
-OptTypeNeeded() {
- case "$local_country_code" in
- CH|DE|DK|FI|FR|HK|IE|IS|NL|NZ|SE|SG|UK|US)
- echo "plain"
- ;;
- *)
- echo "$local_country_code"
- ;;
- esac
-}
-
-AskCountriesAndOptions() {
- local tips=(
- "Select countries to include in mirror ranking"
- " - select one or more countries"
- " - closest locations are usually the fastest"
- " - https is the preferred protocol"
- )
- if [ -r "$REFLECTOR_X_CONF" ] ; then
- tips+=("\nNote: configuration file <b>$REFLECTOR_X_CONF</b> options are in use.")
- else
- tips+=("\nNote: configuration file <b>$REFLECTOR_SIMPLE_CONF</b> is unavailable, using $progname defaults.")
- fi
- local ix included xx tip
- local command
- local columns=5
- local default_age=2
- local default_sort='age!^rate!country!score!delay'
- local default_number=10
- local use_saved=""
-
- case "$(OptTypeNeeded)" in
- plain) ;; # no additional defaults
- "") default_age=1 ;; # country not directly supported by Arch
- [A-Z][A-Z]) default_age=8 ;; # country may lack https mirrors
- esac
-
- [ -n "$conf_age" ] && default_age="$conf_age"
- [ -n "$conf_number" ] && default_number="$conf_number"
- [ -n "$conf_sort" ] && default_sort="$(echo "$default_sort" | sed -e 's|\^||' -e "s|$conf_sort|^$conf_sort|")"
-
-
- command=(eos_yad --form --columns=$columns --title="Select Arch mirrors with $progname v$VERSION_INFO")
- tip=""
- for xx in "${tips[@]}" ; do
- tip+="${xx}\n"
- done
- tip+=""
- command+=(--text="$tip")
-
- for ((ix=0; ix < ${#countrycodes[@]}; ix++)) ; do
- included=false
- IsInSelectedCountries "${countrynames[$ix]}" && included=true
- test "${countrycodes[$ix]}" = "$local_country_code" && included=true
- command+=(--field="${countrynames[$ix]}:chk" $included)
- done
- command+=(--separator=" ") # assumes all returned values lack spaces
- command+=(--image="preferences-system")
-
- #command+=(--field=":LBL" "")
- command+=(--field="<b><i>Feature selection\:</i></b>:LBL" "")
- command+=(--field="Include https mirrors:chk" true) # always suggest https
- included=false
- for xx in "${conf_protocol[@]}" ; do
- case "$xx" in
- http) included=true ; break ;;
- esac
- done
- command+=(--field="Include http mirrors:chk" $included)
- if [ "$rsync_supported" = "yes" ] ; then
- command+=(--field="Include rsync mirrors:chk" false)
- fi
- command+=(--field="Max hours from latest mirror sync":num $default_age) # --age
- command+=(--field="Sort by":cb "$default_sort") # --sort
- command+=(--field="Max number of mirrors":num $default_number) # --number
-
- reflector_info="$("${command[@]}")"
- test -z "$(echo "$reflector_info" | tr -d ' ')" && exit 1 # stop if $reflector_info has no words
- reflector_info=($(echo $reflector_info)) # make it an array
-}
-
-BuildReflectorCommand() {
- local ix xx
- local ix_ext=""
-
- reflector_cmd=(reflector --verbose)
-
- if [ -r "$REFLECTOR_X_CONF" ] ; then
- reflector_cmd+=($(cat $tmpconf | grep -v "^$country_exclude"))
- fi
-
- # then, add countries
- for ((ix=0; ix<${#countrycodes[@]}; ix++)) ; do
- xx="${reflector_info[$ix]}"
- test "$xx" = TRUE && {
- conf_selected_countries+=("${countrynames[$ix]}")
- if [ "${countrynames[$ix]}" != "Worldwide" ] ; then
- reflector_cmd+=(-c "${countrycodes[$ix]}")
- else
- worldwide_selected=1
- fi
- }
- done
-
- # finally, add feature selections
- test "${reflector_info[$((ix++))]}" = "TRUE" && { reflector_cmd+=(--protocol https) ; https_selected=1 ; }
- test "${reflector_info[$((ix++))]}" = "TRUE" && { reflector_cmd+=(--protocol http) ; http_selected=1 ; }
- test "$rsync_supported" = "yes" && {
- test "${reflector_info[$((ix++))]}" = "TRUE" && { reflector_cmd+=(--protocol rsync) ; rsync_selected=1 ; }
- }
- reflector_cmd+=(--age "${reflector_info[$((ix++))]}")
- reflector_cmd+=(--sort $(echo "${reflector_info[$ix]}" | tr -d '|')) # with echo incrementing ix with ++ does not work
- ((ix++))
- reflector_cmd+=(--number "${reflector_info[$((ix++))]}")
-}
-
-ShowMirrorlistSaved() {
- echo "New $ml saved." >&2
- return # showing dialog not really needed...
-
- echo "New $ml saved." | \
- eos_yad --text-info --width=300 --height=100 --align=center \
- --title="Success" --button=yad-quit:0 \
- --timeout=5 --timeout-indicator=left
-}
-
-AddCountryNamesToMirrors() {
- local full_list=$(mktemp)
- wget -q -O $full_list https://www.archlinux.org/mirrorlist/all || {
- echo "Warning: cannot fetch Arch mirror list." >&2
- rm -f $full_list
- return 1
- }
-
- local selected_mirrors=$(grep "^Server = " $tmpfile | awk '{print $3}')
- local sel_mir
- local cc xx
- local country_mirrors country_and_mirror
- local found
- local headers="$(grep "^#" $tmpfile)"
-
- printf "%s\n" "$headers" > $tmpfile
-
- for sel_mir in $selected_mirrors ; do
- found=0
- for cc in "${conf_selected_countries[@]}" ; do
- country_mirrors="$(sed -n '/^## '"$cc"'$/,/^$/p' $full_list | sed '1d;$d' | awk '{print $3}')"
- for xx in $country_mirrors ; do
- if [ "$sel_mir" = "$xx" ] ; then
- found=1
- printf "\n## $cc\nServer = $sel_mir\n" >> $tmpfile
- break
- fi
- test "$found" = "1" && break
- done
- done
- done
- if [ "$worldwide_selected" = "1" ] ; then
- country_mirrors="$(sed -n '/^## Worldwide$/,/^$/p' $full_list | sed '1d;$d' | awk '{print $3}')"
- printf "\n## Worldwide\n" >> $tmpfile
- for xx in $country_mirrors ; do
- case "$xx" in
- "https://"*) test $https_selected -eq 1 && echo "Server = $xx" >> $tmpfile ;;
- "http://"*) test $http_selected -eq 1 && echo "Server = $xx" >> $tmpfile ;;
- "rsync://"*) test $rsync_selected -eq 1 && echo "Server = $xx" >> $tmpfile ;;
- esac
- done
- fi
- rm -f $full_list
-}
-
-SaveMirrorlist() {
- grep "^Server = [hr]" $tmpfile >/dev/null || {
- echo "$progname: no mirrors found!" | \
- eos_yad --text-info --title="Error" --image=error --width=400 --height=300 --button=yad-quit:1
- return 1
- }
- AddCountryNamesToMirrors
-
- local opts=(--width=750 --height=550 --title="New $ml")
- opts+=(--button=yad-quit:1 --button=" Save to $ml!document-save":0)
-
- cat $tmpfile | eos_yad --text-info "${opts[@]}"
- case "$?" in
- 0) pkexec bash -c "cp $ml $ml.bak && cp $tmpfile $ml" && ShowMirrorlistSaved ;;
- esac
-}
-
-Main() {
- local progname=reflector-simple
- local VERSION_INFO="2021"
-
- local REFLECTOR_SIMPLE_CONF=/etc/reflector-simple.conf
- local REFLECTOR_AUTO_CONF=/etc/reflector-auto.conf
- local REFLECTOR_X_CONF=$REFLECTOR_SIMPLE_CONF
-
- [ -r "$REFLECTOR_X_CONF" ] || REFLECTOR_X_CONF=$REFLECTOR_AUTO_CONF
-
- local rsync_supported=no # yes or no
-
- local verbose=$(ArgsYesNo -v "$@")
- local showlist=$(ArgsYesNo -l "$@")
-
- test "$verbose" = "yes" && echo "Find your country ..." >&2
-
- local local_country_code="$(GetYourCountryCode)"
- local countrynames
- local countrycodes
- local reflector_info
- local reflector_cmd
- local ml=/etc/pacman.d/mirrorlist
- local conf_selected_countries=()
- local conf_dropped_countries=()
- local conf_age=""
- local conf_sort=""
- local conf_number=""
- local conf_protocol=()
- local worldwide_selected=0
- local https_selected=0
- local http_selected=0
- local rsync_selected=0
- local country_exclude="--country-exclude" # reflector does not have this option
-
- # Find countries with supported mirrors.
-
- readarray -t countrynames <<< "$(echo "$REFLECTOR_COUNTRIES" | sed 's|^\(.*[a-z]\)[ ]*[A-Z][A-Z].*$|\1|')"
- readarray -t countrycodes <<< "$(echo "$REFLECTOR_COUNTRIES" | awk '{print $(NF-1)}')"
-
- if [ -r "$REFLECTOR_X_CONF" ] ; then
- local tmpconf=$(mktemp)
- _get_reflector_x_configs
- fi
-
- # Now we have info about supported countries.
- # Next, we ask user to give some countries for mirror ranking.
-
- AskCountriesAndOptions # modifies $reflector_info
-
- # Now we know which countries to include in mirror ranking.
- # Let's create a proper reflector command.
-
- BuildReflectorCommand # uses $reflector_info and modifies $reflector_cmd
-
- # Add the save option here!
- local tmpfile=$(mktemp)
-
- # Now all is ready, so just run the command and display a progress bar to the user
-
- line_count=-2
- "${reflector_cmd[@]}" 2>&1 > "$tmpfile" | { while read -r line; do
- if [[ "$line" == *"mirror(s) by"* ]]; then
- max_lines=$(echo "$line" | sed -e 's/.*rating \(.*\) mirror.*/\1/')
- fi
- line_count=$((line_count + 1));
- echo "# $line";
- if [ "$line_count" -ge 0 ]; then
- local value=$(( line_count*100/max_lines ));
- echo "$(( value < 100 ? value : 99 ))%";
- fi
- done; echo 100; } | eos_yad --progress --enable-log --log-on-top --log-expanded --log-height 150 --auto-close --no-buttons --center --width=700 --image=update --image-on-top --title="Testing mirrors..." --percentage=0
-
- # Show the result and ask permission to save the mirrorlist.
-
- SaveMirrorlist
-
- # cleanup
- rm -f "$tmpfile"
- if [ -r "$REFLECTOR_X_CONF" ] ; then
- rm -f "$tmpconf"
- fi
-}
-
-Main "$@"
diff --git a/reflector-simple.desktop b/reflector-simple.desktop
deleted file mode 100644
index baba80e93695..000000000000
--- a/reflector-simple.desktop
+++ /dev/null
@@ -1,15 +0,0 @@
-[Desktop Entry]
-Type=Application
-Encoding=UTF-8
-Name=Reflector Simple
-Name[de]=Reflector Simple
-Comment=A simple GUI for 'reflector'
-Comment[de]=Eine simple GUI zum Mirror refreshen
-Exec=/usr/bin/reflector-simple
-Icon=reload
-# StartupNotify=false
-# Terminal=False
-Hidden=false
-X-GNOME-Autostart-enabled=true
-X-KDE-autostart-after=panel
-Categories=System