feat: check if grep is installed

pull/259/head
Michael Brewer 1 year ago
parent 741a8d7f0b
commit 484fc2747f
No known key found for this signature in database
GPG Key ID: D7A137BA1254AFC7

@ -29,11 +29,15 @@ function extension_installed() {
if [ ! -f "$EXTENSIONS_FILE" ]; then if [ ! -f "$EXTENSIONS_FILE" ]; then
return 1 return 1
fi fi
if grep -q "\"$1\"" "$EXTENSIONS_FILE"; then if ! command -v grep > /dev/null; then
echo "Extension $1 was found in $EXTENSIONS_FILE." return 1
return 0 fi
if ! grep -q "\"$1\"" "$EXTENSIONS_FILE"; then
return 1
fi fi
return 1
echo "Extension $1 was found in $EXTENSIONS_FILE."
return 0
} }
# Check if the settings file exists... # Check if the settings file exists...

Loading…
Cancel
Save