From e02de5772f11397487cdc11297e0846a7f72c46d Mon Sep 17 00:00:00 2001 From: Drew Short Date: Mon, 20 Nov 2017 18:17:54 -0600 Subject: [PATCH] Adding timeshift as an installed utility for all environments --- scripts/installers/install_timeshift.sh | 15 +++++++++++ scripts/installers/install_tools_arch.sh | 24 ++++++++++++------ scripts/installers/install_tools_fedora.sh | 29 ++++++++++++++-------- scripts/installers/install_tools_ubuntu.sh | 27 ++++++++++++-------- 4 files changed, 66 insertions(+), 29 deletions(-) create mode 100755 scripts/installers/install_timeshift.sh diff --git a/scripts/installers/install_timeshift.sh b/scripts/installers/install_timeshift.sh new file mode 100755 index 0000000..8bb2623 --- /dev/null +++ b/scripts/installers/install_timeshift.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env sh + +set -x +set -e + +timeshift_version="v17.11" + +# Install Timeshift +mkdir -p $HOME/tmp +pushd $HOME/tmp +timeshift_file="timeshift-$timeshift_version-amd64.run" +curl -LSO https://github.com/teejee2008/timeshift/releases/download/$timeshift_version/$timeshift_file +chmod +x $timeshift_file +sudo ./$timeshift_file +popd diff --git a/scripts/installers/install_tools_arch.sh b/scripts/installers/install_tools_arch.sh index fbc05cc..24d42a9 100755 --- a/scripts/installers/install_tools_arch.sh +++ b/scripts/installers/install_tools_arch.sh @@ -1,26 +1,31 @@ -#!/usr/bin/env sh +#!/usr/bin/ENV sh set -x set -e -env=/usr/bin/env -opwd=$PWD +ENV=/usr/bin/ENV +OPWD=$PWD +PACKAGE_MANAGER="sudo pacman" +PM_UPDATE="$PACKAGE_MANAGER -Syu" +PM_INSTALL="$PACKAGE_MANAGER -S" +SCRIPT=$(readlink -f "$0") +SCRIPTPATH=$(dirname "$SCRIPT") cd $HOME # Install the minimal toolset to bootstrap out process -sudo pacman -Syu +$PM_UPDATE # Install the development requirements so we can use aur packages -sudo pacman -S --needed base-devel +$PM_INSTALL --needed base-devel # System basics for everything after this point -sudo pacman -S curl wget git zsh vim tmux openssh mosh +$PM_INSTALL curl wget git zsh vim tmux openssh mosh # Install OhMyZSH mkdir -p $HOME/build/oh-my-zsh cd $HOME/build/oh-my-zsh curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -o install.sh chmod +x install.sh -$env sh install.sh +$ENV sh install.sh cd $HOME # Install package-query for yaourt @@ -42,5 +47,8 @@ yaourt -Syua # Install Other Essential Tools yaourt -S lsb-release screenfetch +# Install Timeshift +$SCRIPTPATH/install_timeshift.sh + # Return to where we started -cd $opwd +cd $OPWD diff --git a/scripts/installers/install_tools_fedora.sh b/scripts/installers/install_tools_fedora.sh index 0dab326..5cbb387 100755 --- a/scripts/installers/install_tools_fedora.sh +++ b/scripts/installers/install_tools_fedora.sh @@ -1,28 +1,37 @@ -#!/usr/bin/env sh +#!/usr/bin/ENV sh set -x set -e -env=/usr/bin/env -opwd=$PWD -package_manager="sudo dnf" -pm_update="$package_manager update" -pm_install="$package_manager install" +ENV=/usr/bin/ENV +PM_UPDATE=$PWD +PM_UPDATE="sudo dnf" +PM_UPDATE="$PM_UPDATE update" +PM_INSTALL="$PM_UPDATE install" +SCRIPT=$(readlink -f "$0") +SCRIPTPATH=$(dirname "$SCRIPT") cd $HOME # Install the minimal toolset to bootstrap out process -$pm_update +$PM_UPDATE -y # System basics for everything after this point -$pm_install curl wget git zsh vim tmux mosh +$PM_INSTALL curl wget git zsh vim tmux mosh -y + +# Enabled rpmfusion repositories +sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm +$PM_UPDATE -y # Install OhMyZSH mkdir -p $HOME/build/oh-my-zsh cd $HOME/build/oh-my-zsh curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -o install.sh chmod +x install.sh -$env sh install.sh +$ENV sh install.sh cd $HOME +# Install Timeshift +$SCRIPTPATH/install_timeshift.sh + # Return to where we started -cd $opwd +cd $PM_UPDATE diff --git a/scripts/installers/install_tools_ubuntu.sh b/scripts/installers/install_tools_ubuntu.sh index 9156cb7..332d5f9 100755 --- a/scripts/installers/install_tools_ubuntu.sh +++ b/scripts/installers/install_tools_ubuntu.sh @@ -1,34 +1,39 @@ -#!/usr/bin/env sh +#!/usr/bin/ENV sh set -x set -e -env=/usr/bin/env -opwd=$PWD -package_manager="sudo apt-get" -pm_update="$package_manager update" -pm_install="$package_manager install" +ENV=/usr/bin/ENV +OPWD=$PWD +PACKAGE_MANAGER="sudo apt-get" +PM_UPDATE="$PACKAGE_MANAGER update" +PM_INSTALL="$PACKAGE_MANAGER install" +SCRIPT=$(readlink -f "$0") +SCRIPTPATH=$(dirname "$SCRIPT") cd $HOME # Install the minimal toolset to bootstrap out process -$pm_update +$PM_UPDATE # System basics for everything after this point -$pm_install curl wget git zsh vim tmux mosh python-software-properties software-properties-common +$PM_INSTALL curl wget git zsh vim tmux mosh python-software-properties software-properties-common # Install OhMyZSH mkdir -p $HOME/build/oh-my-zsh cd $HOME/build/oh-my-zsh curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -o install.sh chmod +x install.sh -$env sh install.sh +$ENV sh install.sh cd $HOME # Add the screenfetch repository sudo add-apt-repository -y 'ppa:djcj/screenfetch' # Install Other Essential Tools -$pm_install lsb-release screenfetch +$PM_INSTALL lsb-release screenfetch + +# Install Timeshift +$SCRIPTPATH/install_timeshift.sh # Return to where we started -cd $opwd +cd $OPWD