Diff of /branches/mage-next/src/mage4.functions.sh.in
Parent Directory | Revision Log | Patch
revision 1652 by niro, Fri Jan 13 23:16:36 2012 UTC | revision 1653 by niro, Fri Jan 13 23:17:40 2012 UTC | |
---|---|---|
# | Line 82 mchecksum() | Line 82 mchecksum() |
82 | return "${retval}" | return "${retval}" |
83 | } | } |
84 | ||
85 | mcheckemptydir() | |
86 | { | |
87 | local dir="$1" | |
88 | local retval=1 | |
89 | ||
90 | if [[ ! -d ${dir} ]] | |
91 | then | |
92 | echo "mcheckemptydir(): '${dir}' is not a directory!" | |
93 | retval=3 | |
94 | else | |
95 | shopt -s nullglob dotglob | |
96 | files=( ${dir}/* ) | |
97 | (( ${#files[*]} )) || retval=0 | |
98 | shopt -u nullglob dotglob | |
99 | fi | |
100 | ||
101 | return ${retval} | |
102 | } | |
103 | ||
104 | unpack_packages() | unpack_packages() |
105 | { | { |
106 | local list="$@" | local list="$@" |
|