dawkot For this task you have to use scripts. For example for installing a package make an executable file in $HOME/.bin
folder and name it for example eopkg-it
with this content:
#! /bin/bash
sudo eopkg it $1
# This is the second command that should be triggered after install.
eopkg info $1
Then open terminal and do a simple task eopkg it exa
. You will see that it will be installed and will execute the other command.
So, replace the second command with the command you want to execute after every install
using eopkg
.
I am not saying that this is the best way, but I think you get the idea. Same thing you have to do for remove.
Somewhere in this forum I think someone did a similar script, to trigger another command after every update of linux-lts kernel, but I haven't tried.
This is the content of the script
#!/bin/bash
# This is a bash script to triger an another app if the kernel is updated
eopkg-up() {
sudo eopkg up
if eopkg hs -l 1 | grep -q linux-lts
then ./run_your_wifi_drivers_build
fi
}
Make sure that you have $HOME/.bin
path added in your .bashrc
file. If not, you can add it like this:
## set PATH so it includes user's private .bin
if [ -d "$HOME/.bin" ] ; then
PATH="$HOME/.bin:$PATH"
fi
if you don't want $HOME/bin
but to use $HOME/.local/bin
instead then the PATH should be:
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi