comparison .bash_overrides @ 559:501169756134

.bash_overrides
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 26 Nov 2013 20:25:15 -0800
parents ed193fcaa0dc
children 047a53a8fbad
comparison
equal deleted inserted replaced
558:db2d7026b531 559:501169756134
132 then 132 then
133 command mv "$@" 133 command mv "$@"
134 return 134 return
135 fi 135 fi
136 last=${!#} 136 last=${!#}
137 directory=$(dirname ${last}) 137 if [[ "${last:(-1)}" == "/" ]]
138 then
139 directory=${last}
140 else
141 directory=$(dirname ${last})
142 fi
138 if [[ ! -e "${directory}" ]] 143 if [[ ! -e "${directory}" ]]
139 then 144 then
140 mkdir -p "${directory}" 145 mkdir -p "${directory}"
141 fi 146 fi
142 command mv "$@" 147 command mv "$@"