Skip to content

Commit 1fffbfd

Browse files
author
Woody Gilk
committed
Fixes automatic salt generation on GNU *nix systems
1 parent ac91726 commit 1fffbfd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gitcrypt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ init_config() {
2121
fi
2222
;;
2323
*)
24-
SALT=$(head -c 10 < /dev/random | md5 | cut -c-16)
24+
local md5=$(which md5 2>/dev/null || which md5sum 2>/dev/null)
25+
SALT=$(head -c 10 < /dev/random | $md5 | cut -c-16)
2526
;;
2627
esac
2728
done

0 commit comments

Comments
 (0)