On 24/08/17 16:42, Antonio Quartulli wrote:
> dev-tools/gen-release-tarballs.sh is only for devs, while
> tests/t_cltsrv.sh is for running some tests, but I am not sure sure how
> the latter would interact with non-linux systems.
> 
> Maybe Gert knows(?)

Tried running them through ksh or dash?  Those are the most feature
restrictive shells I can think of right now.  Dash is supposed to be the
most POSIX compliant shell, iirc.


-- 
kind regards,

David Sommerseth
OpenVPN Technologies, Inc



> On 24/08/17 22:37, Илья Шипицин wrote:
>> openvpn is also built on many non bash systems. what about them?
>>
>> 24 авг. 2017 г. 18:34 пользователь "Antonio Quartulli" <a...@unstable.cc>
>> написал:
>>
>> The backquotes for command substitution in bash are
>> considered old-style in favour of the more modern $() [1].
>> Substitute them.
>>
>> [1]https://www.gnu.org/software/bash/manual/html_node/Command-Substitution.
>> html#Command-Substitution
>>
>> Signed-off-by: Antonio Quartulli <a...@unstable.cc>
>> ---
>>
>> note: I did not really know how to test this patch.
>>
>>  dev-tools/gen-release-tarballs.sh | 10 +++++-----
>>  tests/t_cltsrv.sh                 |  6 +++---
>>  2 files changed, 8 insertions(+), 8 deletions(-)
>>
>> diff --git a/dev-tools/gen-release-tarballs.sh b/dev-tools/gen-release-
>> tarballs.sh
>> index f9c620e3..550e5cd2 100755
>> --- a/dev-tools/gen-release-tarballs.sh
>> +++ b/dev-tools/gen-release-tarballs.sh
>> @@ -49,7 +49,7 @@ if [ $? -ne 0 ]; then
>>  fi
>>
>>  # Extract the git URL
>> -giturl="`git remote get-url $arg_remote_name 2>/dev/null`"
>> +giturl="$(git remote get-url $arg_remote_name 2>/dev/null)"
>>  if [ $? -ne 0 ]; then
>>      echo "** ERROR ** Invalid git remote name: $arg_remote_name"
>>      exit 2
>> @@ -71,7 +71,7 @@ get_filename()
>>  {
>>      local wildcard="$1"
>>
>> -    res="`find . -maxdepth 1 -type f -name \"$wildcard\" | head -n1 | cut
>> -d/ -f2-`"
>> +    res="$(find . -maxdepth 1 -type f -name \"$wildcard\" | head -n1 | cut
>> -d/ -f2-)"
>>      if [ $? -ne 0 ]; then
>>          echo "-- 'find' failed."
>>          exit 5
>> @@ -88,7 +88,7 @@ copy_files()
>>      local fileext="$1"
>>      local dest="$2"
>>
>> -    file="`get_filename openvpn-*.*.*.$fileext`"
>> +    file="$(get_filename openvpn-*.*.*.$fileext)"
>>      if [ -z "$file" ]; then
>>          echo "** ERROR Failed to find source file"
>>          exit 5
>> @@ -106,7 +106,7 @@ sign_file()
>>      local signkey="$1"
>>      local srchfile="$2"
>>      local signtype="$3"
>> -    local file="`get_filename $srchfile`"
>> +    local file="$(get_filename $srchfile)"
>>
>>      echo "-- Signing $file ..."
>>      case "$signtype" in
>> @@ -169,7 +169,7 @@ fi
>>  #
>>
>>  # Clone the remote repository
>> -workdir="`mktemp -d -p /var/tmp openvpn-build-release-XXXXXX`"
>> +workdir="$(mktemp -d -p /var/tmp openvpn-build-release-XXXXXX)"
>>  cd $workdir
>>  echo "-- Working directory: $workdir"
>>  echo "-- git clone $giturl"
>> diff --git a/tests/t_cltsrv.sh b/tests/t_cltsrv.sh
>> index 752251e4..1ab3db3e 100755
>> --- a/tests/t_cltsrv.sh
>> +++ b/tests/t_cltsrv.sh
>> @@ -25,14 +25,14 @@ top_builddir="${top_builddir:-..}"
>>  trap "rm -f log.$$ log.$$.signal ; trap 0 ; exit 77" 1 2 15
>>  trap "rm -f log.$$ log.$$.signal ; exit 1" 0 3
>>  addopts=
>> -case `uname -s` in
>> +case $(uname -s) in
>>      FreeBSD)
>>      # FreeBSD jails map the outgoing IP to the jail IP - we need to
>>      # allow the real IP unless we want the test to run forever.
>> -    if test "`sysctl 2>/dev/null -n security.jail.jailed`" = 1 \
>> +    if test "$(sysctl 2>/dev/null -n security.jail.jailed)" = 1 \
>>      || ps -ostate= -p $$ | grep -q J; then
>>         addopts="--float"
>> -       if test "x`ifconfig | grep inet`" = x ; then
>> +       if test "x$(ifconfig | grep inet)" = x ; then
>>             echo "###"
>>             echo "### To run the test in a FreeBSD jail, you MUST add an IP
>> alias for the jail's IP."
>>             echo "###"
>> --
>> 2.14.1

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to