2022-11-12 13:45:03 +00:00
|
|
|
#!/bin/bash
|
2023-04-01 15:16:00 +00:00
|
|
|
NEXTCLOUD_DIR="${NEXTCLOUD_DIR}";
|
|
|
|
|
2022-11-12 13:45:03 +00:00
|
|
|
# Elevate script
|
|
|
|
if [ ! "$UID" -eq 0 ]
|
|
|
|
then
|
2023-05-04 17:47:45 +00:00
|
|
|
sudo NEXTCLOUD_DIR="${NEXTCLOUD_DIR}" bash "$BASH_SOURCE" "$USER";
|
2022-11-13 00:11:32 +00:00
|
|
|
else
|
2023-10-13 08:25:07 +00:00
|
|
|
homeDir="$(realpath ~$1)";
|
2023-01-23 14:55:10 +00:00
|
|
|
fontFileBaseName="Caskaydia Cove Regular Nerd Font Complete.otf";
|
2023-01-23 15:11:51 +00:00
|
|
|
tempFile="$(sudo -u "$1" mktemp -d)/$fontFileBaseName";
|
2023-01-23 14:55:10 +00:00
|
|
|
destination=/usr/share/font/opentype;
|
2022-11-14 21:22:50 +00:00
|
|
|
|
2023-05-03 16:31:38 +00:00
|
|
|
sudo -u "$1" cp "$homeDir/.mnt/$NEXTCLOUD_DIR/Caskaydia Cove Regular Nerd Font Complete.otf" "$tempFile";
|
2023-01-23 14:55:10 +00:00
|
|
|
cp "$tempFile" /usr/share/fonts/opentype;
|
2022-11-12 13:45:03 +00:00
|
|
|
fi
|