1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 15:39:43 +00:00

refactoring

This commit is contained in:
deadc0de6
2023-09-21 10:04:59 +02:00
committed by deadc0de
parent 3e02f39ff6
commit 7c382c2d08

View File

@@ -31,7 +31,10 @@ echo -e "$(tput setaf 6)==> RUNNING $(basename "${BASH_SOURCE[0]}") <==$(tput sg
# $2 path
grep_or_fail()
{
grep "${1}" "${2}" >/dev/null 2>&1 || (echo "pattern not found in ${2}" && exit 1)
if ! grep "${1}" "${2}" >/dev/null 2>&1; then
echo "pattern not found in ${2}"
exit 1
fi
}
# the action temp