8 Commits

Author SHA1 Message Date
Atsushi SAKAI
5509ed5797 Fix comment typos in inc/ and tests/ directories
valu3 => value3
enviromnet => environment
direcotry => directory
virualenv => virtualenv
editiable => editable
envirnment => environment

Change-Id: I97fb2d44a37b16d02d4fbdb08bfa33414349f651
2015-11-30 20:25:17 +09:00
Ian Wienand
ada886dd43 Don't mix declaration and set of locals
Ia0957b47187c3dcadd46154b17022c4213781112 proposes to have bashate
find instances of setting a local value.  The issue is that "local"
always returns 0, thus hiding any failure in the commands running to
set the variable.

This is an automated replacement of such instances

Depends-On: I676c805e8f0401f75cc5367eee83b3d880cdef81
Change-Id: I9c8912a8fd596535589b207d7fc553b9d951d3fe
2015-10-07 17:03:32 +11:00
Ian Wienand
433a9b10dd Don't set xtrace directly in local call
Ia0957b47187c3dcadd46154b17022c4213781112 detects setting local
variables with subshell commands.

Although this is a particuarly benign case, it trips the test.  Rather
than putting in an ignore for this, we can easily change it to make
the test pass.  This seems better than putting in special work-arounds
to bashate, etc.

Change-Id: I37c3967c0f2d780a636a7d26cda83755085c5c69
2015-10-07 16:54:29 +11:00
Ian Wienand
cede787482 Add file creation test
Ensure that iniadd is creating files that don't exist, as it has
historically done.

Change-Id: I2798996f3d46ff1dce410b815a87395f1bf729f9
2015-07-23 06:46:24 +10:00
Ian Wienand
f44a024f02 Add -sudo option to ini setting options
Add a -sudo option to allow these functions to operate on root-owned
files.  Test-case is updated, but not enabled by default as we can't
expect test-runner to have sudo access.

Change-Id: I134c3397314c7d9395996eb6c825ecb7e7fdfc69
2015-07-23 06:46:24 +10:00
Ian Wienand
92884ede5d ini-config : always reenable xtrace on return
These return paths doesn't renable xtrace, so output mysteriously goes
missing until the next time it is enabled.

Change-Id: I3a8018dfa9397c07534970c39fba8dc10afcbe41
2015-07-23 06:46:24 +10:00
Attila Fazekas
1bd79596c3 Move back isset to the functions-common
isset function was moved to config file related functions by accident,
this change also simplfies the isset in a bash >=4.2 way.

All supported distro has at least bash 4.2. (RHEL6 used 4.1)

Change-Id: Id644b46ff9cdbe18cde46e96aa72764e1c8653ac
2015-03-26 14:00:02 +01:00
Dean Troyer
bf2ad7015d Move configuration functions into inc/*
* config/INI functions from functions-common to to inc/ini-config
* local.conf meta-config functions from lib/config to inc/meta-config

Change-Id: I00fab724075a693529273878875cfd292d00b18a
2015-03-09 22:52:19 -05:00