Overview
Comment: | Now has arguments to handle multimple tarballs |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
e3f8343eab0477214fb034f361f2a127 |
User & Date: | gawthrop@users.sourceforge.net on 2000-10-03 11:51:31 |
Other Links: | branch diff | manifest | tags |
Context
2000-10-03
| ||
12:07:29 | Tidied up for use within mtt_backups check-in: 51b4b9eb7e user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
11:51:31 | Now has arguments to handle multimple tarballs check-in: e3f8343eab user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
11:34:53 | Correct $MTT_LIB check-in: 1f3b0f166c user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/mtt_backup from [783be72324] to [4e48d7d64c].
1 2 3 4 | #!/bin/sh # Does a backup with date of selected files. #Name of archive | > > > > > > > > > > > > > > > > > > > > > | > > > > | > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | #!/bin/sh # Does a backup with date of selected files. #Name of archive if [ -z $2 ]; then mtt="mtt" else mtt="mtt-$2" fi case $1 in -d) filename=`date | awk '{printf("%s_%s%s_%s.tgz\n", mtt, $2,$3,$6)}' mtt=$mtt`; shift ;; -v) filename=`mtt --version | awk '{printf("%s-%s.tar.gz\n", mtt, $NF)}' mtt=$mtt`; shift ;; -h) echo "Usage: mtt_backup [-d|-v] [lib|doc]"; exit ;; *) filename=`date | awk '{printf("$mtt$2_%s%s_%s.tgz\n", $2,$3,$6)}'` esac echo Backup file $filename exit #Files to backup dir="mtt" #Check whether archive exists here if [ -f "$filename" ]; then echo File $filename already exists - exiting exit fi # Listing files to ignore echo Finding irrelevant files find $dir -name '*.*' -print |\ grep 'dvi$\|ps$\|pdf$\|html$\|info$\|gif$\|log$\|dat$\|MTT_work\|core\|~$' >IGNORE wc IGNORE | awk '{print "Ignoring", $1, "files"}' #echo examples >> IGNORE #Inform user echo Backing up $dir to $filename #Tar the files tar --exclude-from IGNORE --create --gzip --file $filename $dir |
︙ | ︙ |