| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | |
| 3 | cd $HOME |
| 4 | mkdirscip-shell system . . mkdir. -p backup/spool 2>/dev/nullscip-shell filesystem . . `/dev/null`. |
| 5 | crontab -l >backup/crontab |
| 6 | cd $(perlscip-shell system . . perl. -e 'require "lib/fex.ph"; print $spooldir||"spool"') |
| 7 | testscip-shell system . . test. "$(echoscip-shell system . . echo. *@*)" = "*@*" && exit 1 |
| 8 | |
| 9 | if [scip-shell system . . `[`. -t 0 ]; then |
| 10 | rsync="rsync -vaRH" |
| 11 | echoscip-shell system . . echo. "backup $PWD/ --> $HOME/backup/spool/" |
| 12 | else |
| 13 | rsync="rsync -aRH" |
| 14 | fi |
| 15 | |
| 16 | $rsync --delete --delete-excluded \ |
| 17 | --exclude="*/*@*.*" \ |
| 18 | --exclude="*/SHARE/*/archives" \ |
| 19 | --exclude="*/DOX" \ |
| 20 | --include="*/DOX/*/.fexdox" \ |
| 21 | * $HOME/backup/spool/ |