diff options
Diffstat (limited to 'config/i3blocks/scripts/backup')
-rwxr-xr-x | config/i3blocks/scripts/backup | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/config/i3blocks/scripts/backup b/config/i3blocks/scripts/backup deleted file mode 100755 index bfa3d39..0000000 --- a/config/i3blocks/scripts/backup +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash - -if [[ -n "$BLOCK_BUTTON" ]]; then - nohup urxvt -title "System backup" -hold -e sudo system-backup 2>&1 >/dev/null & -fi - -state=5 -if [[ -e ~/.backup_date ]]; then - now=$(date +"%s") - prev=$(cat ~/.backup_date) - dif=$(expr $now - $prev) - # 15 days - if [[ $dif -ge 648000 ]]; then - state=4 - # 12 days - elif [[ $dif -ge 518400 ]]; then - state=3 - # 5 days - elif [[ $dif -ge 216000 ]]; then - state=2 - # 2 days - elif [[ $dif -ge 86400 ]]; then - state=1 - else - state=0 - fi -fi - -if [[ $state -eq 0 ]]; then - exit 0 -fi - -echo "Do backup" -echo "Backup" -case $state in - 1) - echo - ;; - 2) - echo "#ffff00" - ;; - 3) - echo "#ff8a00" - ;; - 4) - echo "#ff5000" - ;; - 5) - echo "#ff0000" - ;; -esac |