diff --git a/backup.sh b/backup.sh index a083605..28b7c5e 100755 --- a/backup.sh +++ b/backup.sh @@ -1,4 +1,5 @@ #!/bin/bash +## Create by Stefan Sterz in 2017 ## General Settings SOURCES=(/root /etc /home /boot) # What folder should be saved? @@ -141,7 +142,7 @@ fi # Create a special backup approx every week if [[ $WEEKDAY = 7 ]]; then - let WEEK=($DAY+6)/7 + let WEEK=$($DATE +"%W")%5 # save past 5 weeks backup "weekly/$WEEK" fi