Fixes in Backup.sh and add install.sh

This commit is contained in:
Peter Green 2023-01-08 19:59:14 +00:00
parent 5a26589ce1
commit c60762dfc6
2 changed files with 14 additions and 15 deletions

View File

@ -8,25 +8,11 @@
# Last modified: 08/01/2023 #
##################################
# Usage -
# You need to modify the three parameters in the script ('id', 'src', and 'dest') as well as create the 'id' file in the destination volume (tc1.txt or whatever you want).
# Make sure this file is executable (sudo chmod +x Backup.sh).
# Run the script
#./Backup.sh
# Vars...
# Find out what the dest and src are...
echo "Please enter your source path"
read -r src
sed -i "s|source=|source=/$src|" Backup.sh
echo "Please enter your destination path"
read -r dest
sed -i "s|destination=|destination=/$dest|" Backup.sh
source=
destination=
# End variables
# Start the timer.
res1=$(date +%s.%N)

13
install.sh Normal file
View File

@ -0,0 +1,13 @@
#!/bin/bash
# Where are we?
pwd=$(pwd)
# Find out what the src and dest are...
echo "Please enter your source path"
read -r src
sed -i "s|source=|source=/$src|" "$pwd"/Backup.sh
echo "Please enter your destination path"
read -r dest
sed -i "s|destination=|destination=/$dest|" "$pwd"/Backup.sh