Simple program installer

An easy way to install packages which are into package management. Write program name to the box and install.

#!/bin/bash
PROGRAM=`yad --center --width=700 --height=100 --text-align=center --text="Program you want to install. If there has no that program, script ends" --entry --entry-label=SEARCH --entry-text=""`
if [ $? = 0 ];
then
x-terminal-emulator -e /bin/bash -c "sudo apt install $PROGRAM && yad --center --borders=5 --width=400 --text-align=center --button=gtk-ok:1 --title='$PROGRAM installed' --buttons-layout=center"
else exit 0
fi

Program-installer2.zip

Of course a program remover is easy to make just changing apt install line to apt remove line.

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

Edit 20.3.2023

Program-remover.zip

#!/bin/bash
PROGRAM=`yad --center --width=500 --height=100 --text-align=center --text="Program you want to remove" --entry --entry-label=is --entry-text=""`
if [ $? = 0 ];
then
x-terminal-emulator -e /bin/bash -c "sudo apt remove $PROGRAM && yad --center --borders=5 --width=400 --text-align=center --button=gtk-ok:1 --title='$PROGRAM removed!' --buttons-layout=center"
else exit 0
fi