Mercurial > ec-dotfiles
changeset 226:f8be4a3d3b4a
- Fix basename to escape with / instead of -- (workaround for conflict between BSD/GNU/Solaris implementations)
author | edhoprima |
---|---|
date | Sun, 22 Nov 2009 06:42:41 +0000 |
parents | 265a9ca47a19 |
children | 8b1f6f6b6a3b |
files | moefetch.sh |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/moefetch.sh Fri Nov 13 18:47:02 2009 +0000 +++ b/moefetch.sh Sun Nov 22 06:42:41 2009 +0000 @@ -50,7 +50,7 @@ } get_md5() { cat -- "$1" | openssl dgst -md5; } -get_basename() { basename -- "$1"; } +get_basename() { basename /"$1"; } get_filename() { get_basename "${1%.*}"; } get_cleantags() { printf "%s " "$@" | sed -e 's/\&/%26/g;s/=/%3D/g'; } Is_NotMD5() { get_filename "$1" | sed -e 's/\([0-9a-f]\{32\}\)//g'; }