diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-05-18 19:01:25 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-05-18 19:01:25 +0200 |
commit | 334c1b7de39c407e9a97325169dbe8facdc2b827 (patch) | |
tree | 5a02ca676853106241a3fe8be260d0e17f603df6 | |
parent | 417e76a9063a0eaa386ed2313495f184a0bca388 (diff) | |
download | jenkins.debian.net-334c1b7de39c407e9a97325169dbe8facdc2b827.tar.xz |
reproducible: turn some more global variables into local ones
-rwxr-xr-x | bin/reproducible_common.sh | 15 | ||||
-rwxr-xr-x | bin/reproducible_html_graphs.sh | 1 |
2 files changed, 10 insertions, 6 deletions
diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh index 69c205a7..f511b2d3 100755 --- a/bin/reproducible_common.sh +++ b/bin/reproducible_common.sh @@ -256,17 +256,19 @@ publish_page() { } link_packages() { + local i for (( i=1; i<$#+1; i=i+400 )) ; do local string='[' local delimiter='' + local j for (( j=0; j<400; j++)) ; do local item=$(( $j+$i )) if (( $item < $#+1 )) ; then - local string+="${delimiter}\"${!item}\"" - local delimiter=',' + string+="${delimiter}\"${!item}\"" + delimiter=',' fi done - local string+=']' + string+=']' cd /srv/jenkins/bin DATA=" $(python3 -c "from reproducible_common import link_packages; \ print(link_packages(${string}, '$SUITE', '$ARCH'))" 2> /dev/null)" @@ -280,11 +282,12 @@ gen_packages_html() { shift CWD=$(pwd) cd /srv/jenkins/bin + local i for (( i=1; i<$#+1; i=i+100 )) ; do - string='[' - delimiter='' + local string='[' + local delimiter='' for (( j=0; j<100; j++)) ; do - item=$(( $j+$i )) + local item=$(( $j+$i )) if (( $item < $#+1 )) ; then string+="${delimiter}\"${!item}\"" delimiter=',' diff --git a/bin/reproducible_html_graphs.sh b/bin/reproducible_html_graphs.sh index ce8a4678..2cf2c814 100755 --- a/bin/reproducible_html_graphs.sh +++ b/bin/reproducible_html_graphs.sh @@ -451,6 +451,7 @@ create_pkg_sets_pages() { # # create individual pages for all the sets # + local i for i in $(seq 1 ${#META_PKGSET[@]}) ; do PAGE="pkg_set_${META_PKGSET[$i]}.html" echo "$(date) - starting to write $PAGE page." |