From 0a8cc10ec98b8b96645213fcda54572881c2a908 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sat, 12 Nov 2022 14:25:48 +0100 Subject: [PATCH] Add scripts for installing `rclone` --- .vscode/settings.json | 5 +++++ ManuSurface/ManuSurfaceSetup.md | 4 ++-- ManuSurface/setup.sh | 1 + scripts/PopOS/software/rclone/install.sh | 13 +++++++++++++ .../PopOS/software/rclone}/rclone@.service | 2 +- 5 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 scripts/PopOS/software/rclone/install.sh rename {ManuSurface/services => scripts/PopOS/software/rclone}/rclone@.service (96%) diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..82f3d1d48 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "files.associations": { + "*.service": "ini" + } +} diff --git a/ManuSurface/ManuSurfaceSetup.md b/ManuSurface/ManuSurfaceSetup.md index 58d078f01..ccdd8ab6c 100644 --- a/ManuSurface/ManuSurfaceSetup.md +++ b/ManuSurface/ManuSurfaceSetup.md @@ -24,11 +24,11 @@ The steps described here allow the creation of a linux system on a Surface Book ## Enhancement - Install `Gnome Extension Manager` - Install Extensions `Clipboard Indicator` + - Install rclone + - Using [installer script](../scripts/PopOS/software/rclone/install.sh) - Sync NextCloud ```bash - sudo -v ; curl https://rclone.org/install.sh | sudo bash rclone config # add remote - cp ./services/rclone@.service ~/.config/systemd/user/ systemctl --user daemon-reload systemctl --user enable rclone@nextcloud:Nextcloud systemctl --user start rclone@nextcloud:Nextcloud diff --git a/ManuSurface/setup.sh b/ManuSurface/setup.sh index e4fedd6b4..309c97030 100644 --- a/ManuSurface/setup.sh +++ b/ManuSurface/setup.sh @@ -24,6 +24,7 @@ source "$softwareRoot/brave-nightly.sh" source "$softwareRoot/codium.sh" source "$softwareRoot/code.sh" source "$softwareRoot/tea.sh" +source "$softwareRoot/rclone/install.sh" # Install other flatpaks flatpak install flathub com.bitwarden.desktop diff --git a/scripts/PopOS/software/rclone/install.sh b/scripts/PopOS/software/rclone/install.sh new file mode 100644 index 000000000..7b1f37625 --- /dev/null +++ b/scripts/PopOS/software/rclone/install.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# Elevate script +if [ ! "$UID" -eq 0 ] +then + exec sudo bash "$0" +fi + +package=$(mktemp) +wget https://github.com/rclone/rclone/releases/download/v1.60.0/rclone-v1.60.0-linux-amd64.deb -O $package +dpkg -i $package +rm -f $package + +cp ./rclone@.service /etc/systemd/user diff --git a/ManuSurface/services/rclone@.service b/scripts/PopOS/software/rclone/rclone@.service similarity index 96% rename from ManuSurface/services/rclone@.service rename to scripts/PopOS/software/rclone/rclone@.service index 4d92c93b7..03a48907f 100644 --- a/ManuSurface/services/rclone@.service +++ b/scripts/PopOS/software/rclone/rclone@.service @@ -21,4 +21,4 @@ ExecStart= \ ExecStop=bash -c '/bin/fusermount -zu "%h/${EXPRESSION#*":"}"' [Install] -WantedBy=default.target \ No newline at end of file +WantedBy=default.target