lib/update.utils
changeset 69 88a7683efc54
parent 66 482d06935d96
child 82 26a307558602
equal deleted inserted replaced
68:5a0335960591 69:88a7683efc54
    63     local path=$1
    63     local path=$1
    64 
    64 
    65     echo "$ROOT/$path"
    65     echo "$ROOT/$path"
    66 }
    66 }
    67 
    67 
       
    68 ## List names of files in dir:
       
    69 #
       
    70 #   list_files $dir $glob
       
    71 #
       
    72 function list_files {
       
    73     local dir=$1
       
    74     local glob=$2
       
    75     local name=
       
    76 
       
    77     for file in $dir/$glob; do
       
    78         # strip prefix
       
    79         name=${file#$dir/}
       
    80         name=${name%$glob}
       
    81 
       
    82         echo -n "$name "
       
    83     done
       
    84 }
       
    85 
    68 ### HG wrappers
    86 ### HG wrappers
    69 # Run `hg ...` within $REPO.
    87 # Run `hg ...` within $REPO.
    70 function hg {
    88 function hg {
    71     local repo=$REPO
    89     local repo=$REPO
    72 
    90