View Issue Details

IDProjectCategoryView StatusLast Update
0004567Talerdeployment and operationspublic2016-10-11 17:28
ReporterFlorian Dold Assigned ToMarcello Stanisci  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version0.0 
Target Version0.1Fixed in Version0.1 
Summary0004567: fix style and semantics issues in taler-build/switch_active.sh script
DescriptionThere's a host of issues:
- Please use $(...) instead of backticks, backticks aren't nestable and less readable.
- PLEASE check return codes. Currently we're switching to the deployment even though the build failed.
- Use "set -xu". This detects undefined variables and exits when a command failed, which also would resolve the previous bullet point.
- Indent code consistently. "if CONDITION; then" should be on one line.
- Please also include some output (whether we switched or not), so that we can see in buildbot what was actually going on.
TagsNo tags attached.

Activities

Marcello Stanisci

2016-06-17 15:58

reporter   ~0010907

I'll go for using "set -xu", but the script did check before switching, by the
following lines:

# check exit code
if [[ $? == 0 ]]
then ln -fs -T /home/$INACTIVE/sockets /home/test/sockets
fi

Does that not work?

Marcello Stanisci

2016-06-17 22:46

reporter   ~0010910

You might mean "set -eu", since -x does not care about terminating the script (at least in bash). From 'help set':

      -x Print commands and their arguments as they are executed.

Florian Dold

2016-06-17 22:58

manager   ~0010911

Oops, you're right of course.

Marcello Stanisci

2016-06-17 23:23

reporter   ~0010912

Addressed. Tests needed.

Marcello Stanisci

2016-06-20 13:48

reporter   ~0010915

fixed in 9cdd2685e9

Issue History

Date Modified Username Field Change
2016-06-07 19:27 Florian Dold New Issue
2016-06-07 19:27 Florian Dold Status new => assigned
2016-06-07 19:27 Florian Dold Assigned To => Marcello Stanisci
2016-06-17 15:58 Marcello Stanisci Note Added: 0010907
2016-06-17 22:46 Marcello Stanisci Note Added: 0010910
2016-06-17 22:58 Florian Dold Note Added: 0010911
2016-06-17 23:23 Marcello Stanisci Note Added: 0010912
2016-06-20 13:48 Marcello Stanisci Note Added: 0010915
2016-06-20 13:48 Marcello Stanisci Status assigned => resolved
2016-06-20 13:48 Marcello Stanisci Resolution open => fixed
2016-07-09 17:21 Christian Grothoff Product Version => 0.0
2016-07-09 17:21 Christian Grothoff Fixed in Version => 0.1
2016-07-09 17:21 Christian Grothoff Target Version => 0.1
2016-10-11 17:28 Christian Grothoff Status resolved => closed