Add a variable for specifying the nextcloud dir

This commit is contained in:
Manuel Thalmann 2023-04-01 17:16:00 +02:00
parent eddf414785
commit 3ec186c642
4 changed files with 9 additions and 4 deletions

View file

@ -6,7 +6,7 @@ sudo hostnamectl set-hostname ManuPopOSLive;
source "../../scripts/PopOS/Scripts/prepare.sh";
source "../../scripts/PopOS/OS/install.sh";
source "../../scripts/PopOS/Software/Collections/personal.sh";
INSTALL_FONTS=1 source "../../scripts/Common/Config/UserProfile/personal.sh";
INSTALL_FONTS=1 NEXTCLOUD_DIR="Nextcloud" source "../../scripts/Common/Config/UserProfile/personal.sh";
source "../../scripts/PopOS/Scripts/postinstall.sh";
popd > /dev/null;

View file

@ -1,4 +1,6 @@
#!/bin/bash
NEXTCLOUD_DIR="${NEXTCLOUD_DIR}";
# Elevate script
if [ ! "$UID" -eq 0 ]
then
@ -9,6 +11,6 @@ else
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";
sudo -u "$1" cp "$homeDir/$NEXTCLOUD_DIR/Caskaydia Cove Regular Nerd Font Complete.otf" "$tempFile";
cp "$tempFile" /usr/share/fonts/opentype;
fi

View file

@ -1,4 +1,5 @@
#!/bin/bash
NEXTCLOUD_DIR="${NEXTCLOUD_DIR}";
INSTALL_FONTS="${INSTALL_FONTS}";
dir="${BASH_SOURCE%/*}";
pushd "$dir" > /dev/null;
@ -10,7 +11,7 @@ cloudRoot="$configRoot/rclone";
# Sync clouds
{
pushd "$dir" > /dev/null;
gnome-terminal --tab --wait -- /bin/bash "../rclone/InstallSync.sh" nextcloud Nextcloud;
gnome-terminal --tab --wait -- /bin/bash "../rclone/InstallSync.sh" nextcloud "$NEXTCLOUD_DIR";
if [ ! -z "$INSTALL_FONTS" ]
then

View file

@ -1,4 +1,6 @@
#!/bin/bash
NEXTCLOUD_DIR="${NEXTCLOUD_DIR}";
# Elevate script
if [ ! "$UID" -eq 0 ]
then
@ -17,7 +19,7 @@ else
homeDir="$(sudo -u "$1" bash -c 'realpath ~')";
sudo -u "$1" mkdir -p "$homeDir/.omp";
sudo -u "$1" cp "$homeDir/Nextcloud/.omp/manuel.omp.json" "$homeDir/.omp/manuel.omp.json";
sudo -u "$1" cp "$homeDir/$NEXTCLOUD_DIR/.omp/manuel.omp.json" "$homeDir/.omp/manuel.omp.json";
echo 'eval "$(oh-my-posh init bash --config ~/.omp/manuel.omp.json)"' \
| sudo -u "$1" tee -a "$homeDir/.bashrc";