From b28bf324c4af38d01c55e2ade5a29112fb4f1623 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emre=20AKY=C3=9CZ?= Date: Sun, 19 Nov 2023 17:19:41 +0300 Subject: [PATCH] check dash as a dependency --- .local/bin/videosearch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.local/bin/videosearch b/.local/bin/videosearch index 3a24a9a9..40dd47fa 100644 --- a/.local/bin/videosearch +++ b/.local/bin/videosearch @@ -1,6 +1,6 @@ #!/bin/dash -command -v locate >/dev/null || { +command -v locate dash >/dev/null || { sudo pacman -S mlocate && notify-send "Locate not found. Installing..." || { notify-send "Failed. Run the script once on terminal OR change sudo permissions." @@ -11,7 +11,7 @@ command -v locate >/dev/null || { [ -s "$HOME/.config/.mymlocate.db" ] || { notify-send "You have no database. Creating it..." disk_path=$(echo "" | dmenu -l 0 -p "Enter the disk path (e.g '/mnt/harddisk'): ") - doas updatedb -o ~/.config/.mymlocate.db -U "$disk_path" || { + sudo updatedb -o ~/.config/.mymlocate.db -U "$disk_path" || { notify-send "Failed. Run the script once on terminal OR change doas permissions." exit 1 }