# HG changeset patch # User Edho P. Arief # Date 1270719029 -25200 # Node ID 58ad057cd2eca09bdad9740a46c7b865b088299b # Parent 38d6c17353fbeb81f3365a0674f641326f09eb23 - Fix for openssl output parser for generating hashed password - Ensuring usage of POSIX-only subsets of GNU tools capability diff -r 38d6c17353fb -r 58ad057cd2ec moefetch.sh --- a/moefetch.sh Mon Apr 05 20:01:39 2010 +0000 +++ b/moefetch.sh Thu Apr 08 16:30:29 2010 +0700 @@ -344,7 +344,7 @@ s) SITE="$OPTARG";; n) NOCLEAN=1;; p) - LOGIN_PASS=$(printf "%s" "$OPTARG" | openssl dgst -sha1) + LOGIN_PASS=$(printf "%s" "$OPTARG" | openssl dgst -sha1 | sed -e 's/.*\([[:xdigit:]]\{40\}\).*/\1/') has_pass=1 ;; u) @@ -382,6 +382,8 @@ main() { + # removing GNU-ism as much as possible + POSIXLY_CORRECT=1 #initialize global variables init_globals #print welcome message