diff --git a/ManuSurface/ManuSurfaceSetup.md b/ManuSurface/ManuSurfaceSetup.md index ccdd8ab6..3c77a25c 100644 --- a/ManuSurface/ManuSurfaceSetup.md +++ b/ManuSurface/ManuSurfaceSetup.md @@ -27,12 +27,7 @@ The steps described here allow the creation of a linux system on a Surface Book - Install rclone - Using [installer script](../scripts/PopOS/software/rclone/install.sh) - Sync NextCloud - ```bash - rclone config # add remote - systemctl --user daemon-reload - systemctl --user enable rclone@nextcloud:Nextcloud - systemctl --user start rclone@nextcloud:Nextcloud - ``` + - Using [script](../scripts/PopOS/cloud-sync/nextcloud.sh) - Install `oh-my-posh` ```bash sudo wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -O /usr/local/bin/oh-my-posh diff --git a/ManuSurface/setup.sh b/ManuSurface/setup.sh index 309c9703..ca419bb1 100644 --- a/ManuSurface/setup.sh +++ b/ManuSurface/setup.sh @@ -2,6 +2,7 @@ dir="${BASH_SOURCE%/*}" popOSRoot="$dir/../scripts/PopOS" softwareRoot="$popOSRoot/software" +cloudRoot="$popOSRoot/cloud-sync" # Set Hostname sudo hostnamectl set-hostname ManuSurface @@ -38,3 +39,6 @@ sudo apt install steam # Install gnome extensions source "$softwareRoot/gnome-extensions.sh" + +# Sync clouds +source "$cloudRoot/nextcloud.sh" diff --git a/scripts/PopOS/cloud-sync/base.sh b/scripts/PopOS/cloud-sync/base.sh new file mode 100644 index 00000000..7dbaae28 --- /dev/null +++ b/scripts/PopOS/cloud-sync/base.sh @@ -0,0 +1,13 @@ +#!/bin/bash +provider=$1 +dirname=$2 +serviceName=rclone@$provider:$dirname + +echo "Please create a remote named $1" +rclone config + +mkdir ~/$dirName + +systemctl --user enable $serviceName +systemctl --user daemon-reload +systemctl --user start $serviceName diff --git a/scripts/PopOS/cloud-sync/nextcloud.sh b/scripts/PopOS/cloud-sync/nextcloud.sh new file mode 100644 index 00000000..8222ba8a --- /dev/null +++ b/scripts/PopOS/cloud-sync/nextcloud.sh @@ -0,0 +1,2 @@ +#!/bin/bash +source "${BASH_SOURCE%/*}/base.sh" nextcloud Nextcloud