mb-cli wrapper added
This commit is contained in:
parent
cd4f48e402
commit
f0b7c010bc
67
bin/mb-cli
Executable file
67
bin/mb-cli
Executable file
@ -0,0 +1,67 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# mb-cli run some commands from launchers in terminal
|
||||||
|
|
||||||
|
case "$LANG" in
|
||||||
|
pl*)
|
||||||
|
_NOT_FOUND_TERMINATOR="Terminator nie został znaleziony!"
|
||||||
|
_DESC="Zainstaluj Terminatora, aby wykonać skrypt"
|
||||||
|
_INSTALL_TERMINATOR="Zainstaluj Terminatora"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
_NOT_FOUND_TERMINATOR="Terminator not found!"
|
||||||
|
_DESC="To run script install Terminator first"
|
||||||
|
_INSTALL_TERMINATOR="Install Terminator"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if ! hash terminator &> /dev/null
|
||||||
|
then
|
||||||
|
notify-send.sh -i error "$_NOT_FOUND_TERMINATOR" "$_DESC" -o "$_INSTALL_TERMINATOR:pamac-installer terminator"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
case "$LANG" in
|
||||||
|
pl*)
|
||||||
|
_UPDATE="Aktualizacja systemu"
|
||||||
|
_STATS="Statystyki pakietów"
|
||||||
|
_MIRRORS="Ranking mirrorów"
|
||||||
|
_BTOP="Btop - monitor zasobów"
|
||||||
|
_FINISHED="Zakończono! Wciśnij ENTER aby zamknąć terminal"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
_UPDATE="System update"
|
||||||
|
_STATS="Package statistics"
|
||||||
|
_MIRRORS="Morror ranking"
|
||||||
|
_BTOP="Btop - a monitor of resources"
|
||||||
|
_FINISHED=" FINISHED! Hit ENTER or close this window"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
update)
|
||||||
|
CMD="yay -Syyu"
|
||||||
|
terminator -T "$_UPDATE: ($CMD)" -e "${CMD};read -p \"${_FINISHED}\""
|
||||||
|
;;
|
||||||
|
stats)
|
||||||
|
CMD="yay -Ps"
|
||||||
|
terminator -T "$_STATS: ($CMD)" -e "${CMD};read"
|
||||||
|
;;
|
||||||
|
mirrors)
|
||||||
|
CMD="sudo pacman-mirrors -f5"
|
||||||
|
terminator -T "$_MIRRORS: ($CMD)" -e "${CMD};read -p \"${_FINISHED}\""
|
||||||
|
;;
|
||||||
|
mirrors_all)
|
||||||
|
CMD="sudo pacman-mirrors -i -c all"
|
||||||
|
terminator -T "$_MIRRORS: ($CMD)" -e "${CMD};read -p \"${_FINISHED}\""
|
||||||
|
;;
|
||||||
|
mirrors_geo)
|
||||||
|
CMD="sudo pacman-mirrors -i --geoip"
|
||||||
|
terminator -T "$_MIRRORS: ($CMD)" -e "${CMD};read -p \"${_FINISHED}\""
|
||||||
|
;;
|
||||||
|
btop)
|
||||||
|
terminator -T "$_BTOP" -e "btop"
|
||||||
|
;;
|
||||||
|
*):;;
|
||||||
|
esac
|
Loading…
Reference in New Issue
Block a user