View | Details | Raw Unified | Return to bug 4536
Collapse All | Expand All

(-)iso9660 (-6 / +14 lines)
Lines 18-26 Link Here
18
    else
18
    else
19
	JOLIET_OPT="-J"
19
	JOLIET_OPT="-J"
20
    fi
20
    fi
21
    ISOINFO="isoinfo -R"
21
    ISOINFO_CMD="isoinfo"
22
    # isoinfo -d -i "$1" | grep "NO Joliet" > /dev/null || ISOINFO="$ISOINFO $JOLIET_OPT"
22
    
23
    isoinfo -d -i "$1" | grep "Joliet with UCS level [2-9] found" > /dev/null && ISOINFO="$ISOINFO $JOLIET_OPT"
23
    ISOINFO=`isoinfo -d -i "$1"`
24
    if echo $ISOINFO | grep "Rock Ridge signatures version [1-9] found" > /dev/null; then
25
	ISOINFO_CMD="$ISOINFO_CMD -R"
26
    else
27
	echo $ISOINFO | grep "Joliet with UCS level [2-9] found" > /dev/null && ISOINFO_CMD="$ISOINFO_CMD $JOLIET_OPT"
28
    fi
24
}
29
}
25
30
26
mcisofs_list () {
31
mcisofs_list () {
Lines 33-46 Link Here
33
  *)     MYCAT="cat";;
38
  *)     MYCAT="cat";;
34
esac
39
esac
35
40
36
$ISOINFO -l -i "$1" | gawk '
41
$ISOINFO_CMD -l -i "$1" | gawk '
37
BEGIN {
42
BEGIN {
38
  dir="";
43
  dir="";
39
  # Pattern to match 8 first fields.
44
  # Pattern to match 8 first fields.
40
  rx = "[^ 	]+[ 	]+";
45
  rx = "[^ 	]+[ 	]+";
46
  irx = "^..\[ [0-9 ]+\]  ";
41
  rx = "^" rx rx rx rx rx rx rx rx;
47
  rx = "^" rx rx rx rx rx rx rx rx;
42
  # irx = "^. *[0-9]+.  ";
48
  # irx = "^. *[0-9]+.  ";
43
  irx = "^..\[[ 0-9]+\]  ";
44
}
49
}
45
/^$/ { next }
50
/^$/ { next }
46
/^d---------/ { next }
51
/^d---------/ { next }
Lines 57-62 Link Here
57
  # fix perms
62
  # fix perms
58
  sub("^----------   0    0    0", "-r--r--r--   1 root root", attr)
63
  sub("^----------   0    0    0", "-r--r--r--   1 root root", attr)
59
  sub(" $", "", name)
64
  sub(" $", "", name)
65
  # for pure ISO9660 and Joliet UCS level 3
66
  sub(";1$", "", name)
60
  ## sub(";[0-9]+$", "", name) ## would break copyout
67
  ## sub(";[0-9]+$", "", name) ## would break copyout
61
  # skip . and ..
68
  # skip . and ..
62
  if (name ~ /^\.\.?/) next;
69
  if (name ~ /^\.\.?/) next;
Lines 65-71 Link Here
65
}
72
}
66
73
67
mcisofs_copyout () {
74
mcisofs_copyout () {
68
	$ISOINFO -i "$1" -x "/$2" > "$3" 
75
	$ISOINFO_CMD -i "$1" -x "/$2" > "$3" 
69
}
76
}
70
77
71
save_ctype=`locale | grep LC_CTYPE`
78
save_ctype=`locale | grep LC_CTYPE`
Lines 79-84 Link Here
79
    test_iso "$@";
86
    test_iso "$@";
80
    mcisofs_list "$@";
87
    mcisofs_list "$@";
81
    exit 0;;
88
    exit 0;;
89
82
  copyout)
90
  copyout)
83
    test_iso "$@";
91
    test_iso "$@";
84
    mcisofs_copyout "$@";
92
    mcisofs_copyout "$@";

Return to bug 4536