Overview
Comment: | Tidied up for use within mtt_backups |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
51b4b9eb7e6bdf39073f22747d7860f8 |
User & Date: | gawthrop@users.sourceforge.net on 2000-10-03 12:07:29 |
Other Links: | branch diff | manifest | tags |
Context
2000-10-03
| ||
12:12:14 | New path structure to account for three way split in mtt tree check-in: 4c10000b36 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
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 | |
Changes
Modified mttroot/mtt/bin/mtt_backup from [4e48d7d64c] to [adf69bcca0].
1 2 3 | #!/bin/sh # Does a backup with date of selected files. | < < < < < < > < > | > > > > > > > > > > > > > | > > > > > > > > > | | | 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 56 57 58 | #!/bin/sh # Does a backup with date of selected files. while [ -n "`echo $1 | grep '^-'`" ]; do case $1 in -d) format=date; shift ;; -v) format=version; shift ;; -h) echo "Usage: mtt_backup [-d|-v] [lib|doc]"; exit ;; *) format=date; esac done #Name of archive if [ -z "$1" ]; then mtt="mtt" else mtt="mtt-$1" fi ## Create appropriate filename case $format in date) filename=`date | awk '{printf("%s_%s%s_%s.tgz\n", mtt, $2,$3,$6)}' mtt=$mtt`; shift ;; version) filename=`mtt --version | awk '{printf("%s-%s.tar.gz\n", mtt, $NF)}' mtt=$mtt`; shift ;; *) esac echo Backup file $filename #Files to backup dir=$mtt #Check whether archive exists here if [ -f "$filename" ]; then echo File $filename already exists - exiting exit fi |
︙ | ︙ |