mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2025-10-07 07:22:36 +02:00
Check for dependencies && Install them if needed
This commit is contained in:
parent
3ba7e6da11
commit
996af9904e
@ -2,6 +2,7 @@
|
||||
|
||||
while ! ping -c 1 9.9.9.9 > /dev/null 2>&1; do sleep 0.5; done
|
||||
|
||||
INSTALLER="sudo pacman -S --noconfirm"
|
||||
DATA_DIR="$HOME/.cache/youtube_channels"
|
||||
CHANNEL_LIST="$HOME/.local/share/channels.txt"
|
||||
mkdir -p "$DATA_DIR" && touch "$CHANNEL_LIST"
|
||||
@ -15,7 +16,16 @@ error_handling() {
|
||||
notify-send "'channels.txt' formatting is wrong."
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
for pkg in yt-dlp mpv jq; do
|
||||
command -v "$pkg" >/dev/null || {
|
||||
notify-send "$pkg is not installed. Installing..."
|
||||
$INSTALLER "$pkg" || {
|
||||
notify-send "Failed to install $pkg."
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
done
|
||||
}
|
||||
|
||||
compare_data() {
|
||||
local channel_name="$1"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user