Commit graph

6 commits

Author SHA1 Message Date
Doan Tran Cong Danh bbce69f036 vsed: reduce number of digest cmd call
For a vsed call to `nf' files and `nr' regex,
the old code will make `2 * nf * nr' digest calls.
the new code will make `nf * (nr + 1)' digest calls.

Refereance: https://github.com/void-linux/void-packages/issues/11238
2019-05-14 16:33:30 +02:00
Doan Tran Cong Danh 9374b6938e vsed: strip non-digest part before comparing
Accidentally, this change also fixs a potential bug
if `XBPS_DIGEST_CMD` is changed to something other than
its current value: `xbps-uhelper digest'.

Because the old code compares:
- non-stripped old digest; and
- stripped new digest
2019-05-14 16:33:30 +02:00
Doan Tran Cong Danh c384f85d2b vsed: refactor digest variables' name
We don't specify any specific digest function in this function,
and the old variables' name doesn't reflect the fact that they're
a pair of old and new digest built by the same hash function.
2019-05-14 16:33:30 +02:00
maxice8 df5886d7d7 vsed.sh: use XBPS_DIGEST_CMD instead of sha256sum 2019-04-15 12:18:00 -03:00
Enno Boland 8f6d534cac vsed: make more compatible with sed commandline semantics. 2019-02-18 17:23:52 -03:00
maxice8 673504e524 meta: add vsed function 2019-01-16 17:25:46 -02:00