commit 9a46f89a8657946f541584a59992b1fc59e7687a
parent a4a276d3cb12ce94ae44dc27bedcc8a5d701f0bf
Author: kocotian <kocotian@kocotian.pl>
Date: Tue, 5 Jan 2021 21:38:16 +0100
prepared for "checkupdates" from pacman-contrib
Diffstat:
3 files changed, 11 insertions(+), 16 deletions(-)
diff --git a/CONTRIBUTIONS b/CONTRIBUTIONS
@@ -1,2 +1,5 @@
Alad <nynq@nepuyvahk.bet>:
Information about Partial Upgrades and existency a few "pacboys"
+
+icar <https://bbs.archlinux.org/profile.php?id=129973>:
+ "checkupdates" - checking available updates without updating a local database
diff --git a/README b/README
@@ -1,12 +1,12 @@
pacgtk - GUI wrapper for pacman by kocotian
-depends on yad and st
+depends on yad, st and checkupdates from pacman-contrib
============
INSTALLATION
-You need Arch-based distribution. To install yad write:
+You need Arch-based distribution. To install yad and checkupdates write:
- # pacman -S yad
+ # pacman -S yad pacman-contrib
You will need your st build, to do this you can install default
st in arch repos:
diff --git a/pacgtk b/pacgtk
@@ -1,7 +1,7 @@
#!/bin/sh
# pacgtk - GUI wrapper for pacman by kocotian
# depends on yad and st.
-# version 1.2
+# version 1.2.1-pre1
# Other configuration:
termcommand="st -e"
@@ -29,22 +29,14 @@ yad --title "pacgtk" \
flagtype="update"
}
-query="$(if [ $flagtype = update ]; then # TODO: make this in less bloated way
- yad --title "pacgtk" \
- --text "$lang_text_search" \
- --entry --center \
- --width=500 --height=100 \
- --button="$lang_text_btn_updateonly":2 \
- --button=yad-cancel:1 \
- --button=yad-ok:0
-else
- yad --title "pacgtk" \
+[ $flagtype = update ] && additionalbtn="--button=$lang_text_btn_updateonly:2"
+query="$(yad --title "pacgtk" \
--text "$lang_text_search" \
--entry --center \
--width=500 --height=100 \
+ "$additionalbtn" \
--button=yad-cancel:1 \
- --button=yad-ok:0
-fi; exit $?)"
+ --button=yad-ok:0; exit $?)"
s=$?
if [ $s = 2 ]; then
flagtype="updateonly"