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,10 +19,10 @@ applyFontsToSystem() {
sudo rsync -av "${XDG_DATA_HOME:-$HOME/.local/share}/fonts" "$FONT_DIR"
else
### Linux
### Copy fonts
logg info 'Copying fonts from ~/.local/share/fonts to /usr/local/share/fonts to make them available globally'
FONT_DIR='/usr/local/share/fonts'
sudo rsync -av "${XDG_DATA_HOME:-$HOME/.local/share}/fonts" "$FONT_DIR"
fi
### Configure system font properties
if [ -d /etc/fonts ]; then
@ -31,6 +31,7 @@ applyFontsToSystem() {
else
logg warn 'The /etc/fonts directory is missing'
fi
fi
}
# @description Applies various `dconf`, `xconf`, etc. settings to Linux systems
@ -492,6 +493,8 @@ enableAutoUpdateDarwin() {
#
# * `export QT_STYLE_OVERRIDE=kvantum-dark` which is required for the Linux GNOME / KDE themeing that relies on Kvantum.
ensureQtStyleOverride() {
if [ ! -d /Applications ] || [ ! -d /System ]; then
### Linux
### Ensure QT_STYLE_OVERRIDE is set in /etc/environment
logg info 'Ensuring QT_STYLE_OVERRIDE is set in /etc/environment'
if cat /etc/environment | grep QT_STYLE_OVERRIDE > /dev/null; then
@ -501,13 +504,14 @@ ensureQtStyleOverride() {
echo 'export QT_STYLE_OVERRIDE=kvantum-dark' | sudo tee -a /etc/environment
logg info 'Added QT_STYLE_OVERRIDE to /etc/environment'
fi
fi
}
# @description Run `gem update --system` if `gem` is available
ensureSystemGemUpdated() {
### Ensure gem is updated
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
logg info 'Could not find gem in PATH so skipping gem system update'
fi