2 # This tool is in experimental status.
4 # Send me an email, if you have nice ideas.
5 # weule@uni-duesseldorf.de
7 #====================================================================
11 # ddstool create-label 'unique-string and more strings'
13 # To archive something:
14 # ddstool append pathnames...
16 # To delete the old index-files and make a new label:
17 # ddstool new-label 'unique-string and more strings'
19 # Each index is stored by the pathnames:
20 # $A/$unique-string.$file-number (soft link)
21 # $A/$timestamp-of-the-tapelabel.$file-number (file)
23 #====================================================================
24 # Sorry that I don't know the right method to extract something.
25 # For now it's more save to do it by hand.
27 #====================================================================
34 L=`mt-dds label | awk '{print $1}' `
39 F=`mt status | awk '{ if ($1 == "file") printf("%02d",$4) }'`
40 echo $A/$T.$F $A/$L.$F
42 ln -f -s $A/$T.$F $A/$L.$F
44 tar --label "$L" -b 32 -R -v -v --record-file $A/$T.$F --create $*
48 tar --create --label "$2" -b 2
52 L=`mt-dds label | awk '{print $1}' `
56 L=`echo "$2" | awk '{print $1}'`
57 if test -f $L.01 ; then
58 echo $0: ERROR: Label ist schon bekannt!
60 tar --create --label "$2" -b 2
64 tar -b 1 -t -v -v -R --record-file $A/$T.$F
65 ln -f -s $A/$T.$F $A/$L.$F
70 L=`mt-dds label | awk '{print $1}' `
75 tar -v -v -R -t -b $B --record-file $A/$T.$F
78 F=`mt status | awk '{ if ($1 == "file") printf("%02d",$4) }'`
80 echo $A/$T.$F $A/$L.$F
82 ln -f -s $A/$T.$F $A/$L.$F
85 tar -b $B -t -R -v -v --record-file $A/$T.$F