mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 08:41:43 +05:30
fix(brew): Brew installation script fix
- Remove font installation through brew
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env sh
|
||||
#!/usr/bin/env bash
|
||||
# NOTE: This is NOT POSIX compliant because - brew install script does not support that
|
||||
|
||||
BREW_PACKAGE_FILE=package-list-brew
|
||||
|
||||
@@ -11,7 +12,7 @@ input_file_check() {
|
||||
|
||||
install_brew() {
|
||||
if ! command -v brew >/dev/null 2>&1; then
|
||||
yes | NONINTERACTIVE=1 bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
yes | NONINTERACTIVE=1 bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" || echo "Brew install failed"
|
||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||
fi
|
||||
|
||||
@@ -42,7 +43,8 @@ install_brew_packages() {
|
||||
done <"$BREW_PACKAGE_FILE"
|
||||
|
||||
# Install available brew packages
|
||||
if ! brew install "$found_packages"; then
|
||||
# shellcheck disable=SC2086
|
||||
if ! brew install $found_packages; then
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
@@ -59,6 +61,8 @@ print_summary() {
|
||||
main() {
|
||||
input_file_check
|
||||
install_brew
|
||||
|
||||
|
||||
install_brew_packages
|
||||
print_summary "Brew" "$not_found_packages"
|
||||
}
|
||||
|
||||
@@ -31,15 +31,7 @@ post_install() {
|
||||
# Time fix for Windows dual boot
|
||||
timedatectl set-local-rtc 1 --adjust-system-clock && echo "Set Datetime"
|
||||
|
||||
# Use brew-installed fonts current user
|
||||
if [ -d /home/linuxbrew/.linuxbrew/share/fonts ]; then
|
||||
mkdir -p ~/.local/share/fonts
|
||||
ln -s /home/linuxbrew/.linuxbrew/share/fonts/* ~/.local/share/fonts/ && fc-cache -fv
|
||||
fi
|
||||
|
||||
rm -rf ~/.cache
|
||||
|
||||
up
|
||||
}
|
||||
|
||||
pre_install() {
|
||||
|
||||
@@ -6,14 +6,6 @@ dnscrypt-proxy
|
||||
docker
|
||||
docker-compose
|
||||
fd
|
||||
font-caskaydia-mono-nerd-font
|
||||
font-fira-code-nerd-font
|
||||
font-fira-mono-nerd-font
|
||||
font-hasklug-nerd-font
|
||||
font-inconsolata-nerd-font
|
||||
font-jetbrains-mono-nerd-font
|
||||
font-liberation-nerd-font
|
||||
font-symbols-only-nerd-font
|
||||
fzf
|
||||
go
|
||||
jq
|
||||
|
||||
Reference in New Issue
Block a user