Skip to content

Commit

Permalink
Avoid GNUism
Browse files Browse the repository at this point in the history
head -c is not posix-compliant, use cut -b instead.
  • Loading branch information
Christopher Zimmermann authored and kit-ty-kate committed Jun 4, 2024
1 parent 936cf1e commit 9ba370f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ users)
* env tests: add regression test for append/prepend operators to empty environment variables [#5925, #5935 @dra27]
* env.win32: add regression test for handling the empty entry in PATH-like variables [#5926, #5935 @dra27]
* lint: add W41 examples [#5927 @dra27]
* [BUG]: head -c is not posix compliant. Use cut -b instead. [#5989 @madroach]

### Engine
* Add `sort` command [#5935 @dra27]
Expand Down
2 changes: 1 addition & 1 deletion tests/reftests/legacy-git.test
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ARCHIVE=$1; shift
if [ ! -e "packages/${ARCHIVE}" ]; then ( cd packages && tar czf ${ARCHIVE} ${ARCHIVE%.tar.gz}; ) fi
MD5=$(openssl md5 packages/${ARCHIVE} | cut -d' ' -f2)
echo 'src: "http://dev.null" checksum: "'$MD5'"' > REPO/packages/${PKG}/url
CACHEDIR=REPO/cache/md5/$(echo $MD5 |head -c2)
CACHEDIR=REPO/cache/md5/$(echo $MD5 |cut -b -2)
mkdir -p $CACHEDIR
cp "packages/$ARCHIVE" "$CACHEDIR/$MD5"
### : INIT :
Expand Down
2 changes: 1 addition & 1 deletion tests/reftests/legacy-local.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ARCHIVE=$1; shift
if [ ! -e "packages/${ARCHIVE}" ]; then ( cd packages && tar czf ${ARCHIVE} ${ARCHIVE%.tar.gz}; ) fi
MD5=$(openssl md5 packages/${ARCHIVE} | cut -d' ' -f2)
echo 'src: "http://dev.null" checksum: "'$MD5'"' > REPO/packages/${PKG}/url
CACHEDIR=REPO/cache/md5/$(echo $MD5 |head -c2)
CACHEDIR=REPO/cache/md5/$(echo $MD5 |cut -b -2)
mkdir -p $CACHEDIR
cp "packages/$ARCHIVE" "$CACHEDIR/$MD5"
### : INIT :
Expand Down

0 comments on commit 9ba370f

Please sign in to comment.