bootstrap: lsd: feat: Add check if lsd is installed

This commit is contained in:
PorridgePi
2022-09-28 19:50:53 +08:00
parent 6f27d492ec
commit 38568dba85

View File

@@ -1,4 +1,7 @@
if [[ "$OSNAME" == "Linux" ]]; then
if ! command -v lsd &> /dev/null; then
echo 'Installing lsd'
if [[ "$OSNAME" == "Linux" ]]; then
# Linux
if [[ "DISTRO_TYPE" == "debian" ]]; then
# Debian-based
@@ -11,12 +14,15 @@ if [[ "$OSNAME" == "Linux" ]]; then
echo 'Exiting...'
exit 1
fi
elif [[ "$OSNAME" == "macOS" ]]; then
elif [[ "$OSNAME" == "macOS" ]]; then
# macOS
brew install lsd
else
else
# Unknown
echo 'ERROR: Unknown OS'
echo 'Exiting...'
exit 1
fi
fi
echo 'lsd is installed'