comparison moefetch.sh @ 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
comparison
equal deleted inserted replaced
225:265a9ca47a19 226:f8be4a3d3b4a
48 Copyright (c) 2009 edogawaconan <me@myconan.net> 48 Copyright (c) 2009 edogawaconan <me@myconan.net>
49 " 49 "
50 } 50 }
51 51
52 get_md5() { cat -- "$1" | openssl dgst -md5; } 52 get_md5() { cat -- "$1" | openssl dgst -md5; }
53 get_basename() { basename -- "$1"; } 53 get_basename() { basename /"$1"; }
54 get_filename() { get_basename "${1%.*}"; } 54 get_filename() { get_basename "${1%.*}"; }
55 get_cleantags() { printf "%s " "$@" | sed -e 's/\&/%26/g;s/=/%3D/g'; } 55 get_cleantags() { printf "%s " "$@" | sed -e 's/\&/%26/g;s/=/%3D/g'; }
56 Is_NotMD5() { get_filename "$1" | sed -e 's/\([0-9a-f]\{32\}\)//g'; } 56 Is_NotMD5() { get_filename "$1" | sed -e 's/\([0-9a-f]\{32\}\)//g'; }
57 57
58 58