Silenced gem update --system

This commit is contained in:
Brian Zalewski 2023-12-25 03:24:34 +00:00
parent d37d90a0bd
commit 725546acda

View file

@ -19,17 +19,18 @@ applyFontsToSystem() {
sudo rsync -av "${XDG_DATA_HOME:-$HOME/.local/share}/fonts" "$FONT_DIR" sudo rsync -av "${XDG_DATA_HOME:-$HOME/.local/share}/fonts" "$FONT_DIR"
else else
### Linux ### Linux
### Copy fonts
logg info 'Copying fonts from ~/.local/share/fonts to /usr/local/share/fonts to make them available globally' logg info 'Copying fonts from ~/.local/share/fonts to /usr/local/share/fonts to make them available globally'
FONT_DIR='/usr/local/share/fonts' FONT_DIR='/usr/local/share/fonts'
sudo rsync -av "${XDG_DATA_HOME:-$HOME/.local/share}/fonts" "$FONT_DIR" sudo rsync -av "${XDG_DATA_HOME:-$HOME/.local/share}/fonts" "$FONT_DIR"
fi
### Configure system font properties ### Configure system font properties
if [ -d /etc/fonts ]; then if [ -d /etc/fonts ]; then
logg info 'Copying ~/.config/fontconfig/fonts.conf to /etc/fonts/local.conf' logg info 'Copying ~/.config/fontconfig/fonts.conf to /etc/fonts/local.conf'
sudo cp -f "${XDG_CONFIG_HOME:-$HOME/.config}/fontconfig/fonts.conf" /etc/fonts/local.conf sudo cp -f "${XDG_CONFIG_HOME:-$HOME/.config}/fontconfig/fonts.conf" /etc/fonts/local.conf
else else
logg warn 'The /etc/fonts directory is missing' logg warn 'The /etc/fonts directory is missing'
fi
fi fi
} }
@ -492,14 +493,17 @@ enableAutoUpdateDarwin() {
# #
# * `export QT_STYLE_OVERRIDE=kvantum-dark` which is required for the Linux GNOME / KDE themeing that relies on Kvantum. # * `export QT_STYLE_OVERRIDE=kvantum-dark` which is required for the Linux GNOME / KDE themeing that relies on Kvantum.
ensureQtStyleOverride() { ensureQtStyleOverride() {
### Ensure QT_STYLE_OVERRIDE is set in /etc/environment if [ ! -d /Applications ] || [ ! -d /System ]; then
logg info 'Ensuring QT_STYLE_OVERRIDE is set in /etc/environment' ### Linux
if cat /etc/environment | grep QT_STYLE_OVERRIDE > /dev/null; then ### Ensure QT_STYLE_OVERRIDE is set in /etc/environment
sudo sed -i 's/.*QT_STYLE_OVERRIDE.*/export QT_STYLE_OVERRIDE=kvantum-dark/' /etc/environment logg info 'Ensuring QT_STYLE_OVERRIDE is set in /etc/environment'
logg info 'Updated QT_STYLE_OVERRIDE in /etc/environment' if cat /etc/environment | grep QT_STYLE_OVERRIDE > /dev/null; then
else sudo sed -i 's/.*QT_STYLE_OVERRIDE.*/export QT_STYLE_OVERRIDE=kvantum-dark/' /etc/environment
echo 'export QT_STYLE_OVERRIDE=kvantum-dark' | sudo tee -a /etc/environment logg info 'Updated QT_STYLE_OVERRIDE in /etc/environment'
logg info 'Added QT_STYLE_OVERRIDE to /etc/environment' else
echo 'export QT_STYLE_OVERRIDE=kvantum-dark' | sudo tee -a /etc/environment
logg info 'Added QT_STYLE_OVERRIDE to /etc/environment'
fi
fi fi
} }
@ -507,7 +511,7 @@ ensureQtStyleOverride() {
ensureSystemGemUpdated() { ensureSystemGemUpdated() {
### Ensure gem is updated ### Ensure gem is updated
if command -v gem > /dev/null; then if command -v gem > /dev/null; then
logg info 'Ensuring system gem is updated' && gem update --system logg info 'Ensuring system gem is updated' && gem update --system > /dev/null
else else
logg info 'Could not find gem in PATH so skipping gem system update' logg info 'Could not find gem in PATH so skipping gem system update'
fi fi