From 7e78c133c7a373384411d9fd0e1366b14e4c31d8 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Wed, 1 Nov 2017 15:40:09 -0400 Subject: Support OTP-20 Unicode functions Use either optional compilation or version-safe variants of the string functions. Prevents warnings when the switch to OTP-21 will happen. --- priv/templates/extended_bin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'priv/templates/extended_bin') diff --git a/priv/templates/extended_bin b/priv/templates/extended_bin index 19d9d29..baa239c 100755 --- a/priv/templates/extended_bin +++ b/priv/templates/extended_bin @@ -151,7 +151,7 @@ relx_get_nodename() { id="longname$(relx_gen_id)-${NAME}" "$BINDIR/erl" -boot start_clean \ -boot_var ERTS_LIB_DIR "$ERTS_LIB_DIR" \ - -eval '[H]=tl(string:tokens(atom_to_list(node()),"@")), io:format("~s~n",[H]), halt()' \ + -eval '[_,H]=re:split(atom_to_list(node()),"@",[unicode,{return,list}]), io:format("~s~n",[H]), halt()' \ -noshell ${NAME_TYPE} $id } -- cgit v1.2.3