Revision fd8b1db0

View differences:

src/tm_mad/tm_common.sh
45 45
    fix_var_slashes
46 46
}
47 47

  
48
# Takes out uneeded slashes. Repeated and final directory slashes:
49
# /some//path///somewhere/ -> /some/path/somewhere
48 50
function fix_dir_slashes
49 51
{
50 52
    dirname "$1/file" | sed -E 's/\/+/\//g'
......
58 60

  
59 61
function fix_paths
60 62
{
61
    if [ -n "$VMDIR" ]; then
63
    if [ "x$ONE_LOCAL_VAR" != "x$VMDIR" ]; then
62 64
        SRC_PATH=`fix_dir_slashes "$SRC_PATH"`
63 65
        SRC_PATH=${SRC_PATH/$VMDIR/$ONE_LOCAL_VAR}
64 66
        DST_PATH=`fix_dir_slashes "$DST_PATH"`
......
68 70

  
69 71
function fix_src_path
70 72
{
71
    if [ -n "$VMDIR" ]; then
73
    if [ "x$ONE_LOCAL_VAR" != "x$VMDIR" ]; then
72 74
        SRC_PATH=`fix_dir_slashes "$SRC_PATH"`
73 75
        SRC_PATH=${SRC_PATH/$VMDIR/$ONE_LOCAL_VAR}
74 76
    fi
......
76 78

  
77 79
function fix_dst_path
78 80
{
79
    if [ -n "$VMDIR" ]; then
81
    if [ "x$ONE_LOCAL_VAR" != "x$VMDIR" ]; then
80 82
        DST_PATH=`fix_dir_slashes "$DST_PATH"`
81 83
        DST_PATH=${DST_PATH/$VMDIR/$ONE_LOCAL_VAR}
82 84
    fi

Also available in: Unified diff