PortValhalla/scripts/Config/Fonts/NerdFont/install.sh

15 lines
456 B
Bash
Raw Normal View History

2022-11-12 13:45:03 +00:00
#!/bin/bash
# Elevate script
if [ ! "$UID" -eq 0 ]
then
2022-11-13 00:11:32 +00:00
sudo bash "$BASH_SOURCE" "$USER"
else
homeDir=$(sudo -u $1 bash -c 'realpath ~')
2022-11-14 21:22:50 +00:00
fontFileBaseName="Caskaydia Cove Regular Nerd Font Complete.otf"
tempFile=$(sudo -u $1 mktemp -d)/$fontFileBaseName
destination=/usr/share/font/opentype
sudo -u $1 cp "$homeDir/Nextcloud/Caskaydia Cove Regular Nerd Font Complete.otf" "$tempFile"
cp "$tempFile" /usr/share/fonts/opentype
2022-11-12 13:45:03 +00:00
fi