tests-always-included/mo

demo script doesn't work

rk295 opened this issue · 4 comments

On Centos 6 version of bash the two variables at the top need to be exported before they are available to mo

% bash --version
GNU bash, version 4.1.2(1)-release (i386-redhat-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
% bash important-file
#
# This file automatically generated at
home_ip=

# ALLOWED HOSTS
# No allowed hosts

# DENIED HOSTS
# No denied hosts
% cp important-file important-file.orig
% vi important-file
% diff important-file.orig important-file
8,9c8,9
< IP=127.0.0.1
< ALLOWED_HOSTS=( 192.168.0.1 192.168.0.2 192.168.0.3 )

---
> export IP=127.0.0.1
> export ALLOWED_HOSTS=( 192.168.0.1 192.168.0.2 192.168.0.3 )
% bash important-file
#
# This file automatically generated at
home_ip=127.0.0.1

# ALLOWED HOSTS
# No allowed hosts

# DENIED HOSTS
# No denied hosts
%

Closed per your pull request #4.

Even with #4, the array is not exported properly.

I freshly cloned and the array looks good to me. What about you @rk295?

$ demo/important-file 
# *** OH SO IMPORTANT ***
# This file automatically generated at Wed Jan 28 15:12:14 UTC 2015
home_ip=127.0.0.1

# ALLOWED HOSTS
allowed_host=192.168.0.1
allowed_host=192.168.0.2
allowed_host=192.168.0.3


# DENIED HOSTS
# No denied hosts
$ bash --version
GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

👍 same for me with a clean copy of the repo. My bad.