From 7bb1dd4882b6efaef7a97e970f5b064e00c41655 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Mon, 14 Nov 2022 22:22:50 +0100 Subject: [PATCH] Fix font installation --- scripts/PopOS/fonts.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/PopOS/fonts.sh b/scripts/PopOS/fonts.sh index 55230541..469a6ccd 100755 --- a/scripts/PopOS/fonts.sh +++ b/scripts/PopOS/fonts.sh @@ -5,5 +5,10 @@ then sudo bash "$BASH_SOURCE" "$USER" else homeDir=$(sudo -u $1 bash -c 'realpath ~') - cp "$homeDir/Nextcloud/Caskaydia Cove Regular Nerd Font Complete.otf" /usr/share/font/opentype + 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 fi