Skip to content

Commit beb3db2

Browse files
committed
Improve the hash
1 parent e908de1 commit beb3db2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/install.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22

33
gethash() {
44
if hash md5sum 2>/dev/null; then
5-
echo -n "$@" | md5sum
5+
echo -n "$@" | md5sum | awk '{print $1}'
66
else
7-
echo -n "$@" | md5
7+
echo -n "$@" | md5 | awk '{print $1}'
88
fi
99
}
1010

11-
BUILD_DIR=build/`gethash $@`
11+
HASH=`gethash $@`
12+
BUILD_DIR=build/`echo ${HASH::7}`
1213

1314
echo "Using directory: ${BUILD_DIR}"
1415
# Prepare a folder

0 commit comments

Comments
 (0)