16 lines
530 B
Bash
Executable file
16 lines
530 B
Bash
Executable file
#!/bin/bash
|
|
NEXTCLOUD_DIR="${NEXTCLOUD_DIR}";
|
|
|
|
# Elevate script
|
|
if [ ! "$UID" -eq 0 ]
|
|
then
|
|
sudo NEXTCLOUD_DIR="${NEXTCLOUD_DIR}" bash "$BASH_SOURCE" "$USER";
|
|
else
|
|
homeDir="$(realpath ~$1)";
|
|
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/.mnt/$NEXTCLOUD_DIR/Caskaydia Cove Regular Nerd Font Complete.otf" "$tempFile";
|
|
cp "$tempFile" /usr/share/fonts/opentype;
|
|
fi
|