1 : $XConsortium: bax.sh /main/2 1996/05/10 16:42:46 drk $
4 # @(#)bax (AT&T Bell Laboratories) 05/09/95
6 # ../lib/bax/init on $PATH to customize
10 customize=../lib/${command}/init
13 # no stinking environment
16 root= arch_name= arch_keep= big_size= big_magic_keep=
17 name_skip= path_skip= reg_magic_skip= src_name= src_magic_skip=
24 do if test -f $dir/$customize
25 then . $dir/$customize
37 # keep these architecture specific files: */${arch_name}/*/${arch_keep}
40 arch_name=${arch_name:-'arch'}
41 arch_keep=${arch_keep:-'bin|fun|lib'}
44 # files bigger than ${big_size} must have magic that matches ${big_magic_keep}
47 big_size=${big_size:-5000000}
48 big_magic_keep=${big_magic_keep:-'mail'}
51 # ${name_skip} are base names to be skipped
52 # ${path_skip} are path prefixes to be skipped
55 name_skip=${name_skip:-'?(*.)(old|save|tmp)?(.*)|.*-cache'}
56 path_skip=${path_skip:-'/dev|/usr/local/ast/ship'}
59 # regular files with magic that matches ${reg_magic_skip} are skipped
62 reg_magic_skip=${reg_magic_skip:-'core|cql * index|history|TeX dvi'}
65 # files under */${src_name}/* are skipped if magic matches ${src_magic_skip}
68 src_name=${src_name:-'src'}
69 src_magic_skip=${src_magic_skip:-'executable|object|(archive|shared) library'}
72 [01]) echo "Usage: $command delta base [dir ...]" >&2
94 begin: int arch_bit = 1;
100 select: if (name == '${name_skip}')
102 else if (type == REG)
105 if (size > ${big_size} && m != '*@(${big_magic_keep})*' ||
106 m == '*@(${reg_magic_skip})*' ||
107 (parent.local & src_bit) && m == '*@(${src_magic_skip})*')
110 else if (type == DIR)
112 local = (parent.local & src_bit);
113 if (dev != parent.dev || path == '${path_skip}' || (parent.parent.local & arch_bit) && name != '${arch_keep}')
115 else if (name == '${arch_name}')
117 else if (name == '${src_name}')
121 " | pax -o "write ordered physical verbose file=$delta base=$base"