local-bin/apsalar/vesktop
2024-03-03 15:38:55 +02:00

24 lines
435 B
Bash
Executable File

#!/bin/sh
arRPCdir="$HOME/.local/lib/arRPC"
# check if arRPC is installed and autoinstall if necessary
install_arRPC () {
git clone https://github.com/OpenAsar/arRPC "$arRPCdir"
cd "$arRPCdir" && npm install
}
if [ ! -d "$arRPCdir" ]; then
install_arRPC
fi
# start arRPC
cd "$arRPCdir" && node src &
arRPCPID=$(pgrep -f 'node src')
# start Vesktop
/usr/local/bin/vesktop
# exit arRPC when Vesktop closes
pkill -9 $arRPCPID