PortValhalla/scripts/PopOS/software/rclone/install.sh

14 lines
326 B
Bash
Raw Normal View History

2022-11-12 13:25:48 +00:00
#!/bin/bash
# Elevate script
if [ ! "$UID" -eq 0 ]
then
2022-11-13 00:11:32 +00:00
sudo bash "$BASH_SOURCE"
else
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
2022-11-12 13:25:48 +00:00
2022-11-13 00:12:13 +00:00
cp ${BASH_SOURCE%/*}/rclone@.service /etc/systemd/user
2022-11-13 00:11:32 +00:00
fi