summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Swartzlander <ben@swartzlander.org>2017-01-28 15:39:09 -0500
committerBen Swartzlander <ben@swartzlander.org>2017-01-29 23:56:20 +0000
commit0c98cfee3e32452f2be3a4bf9aa532d10ba15249 (patch)
tree9f522425ba1cf3ccd5231b32940cae8fd27a0131
parent0358d1f17593a77fa8e804a6f75b8483c886cdfe (diff)
Wrap long lines
Fix bashate warning E006 by wrapping long lines. Also make sure bashate runs on init scripts that don't end in .sh. Change-Id: I077a064505e6f11f61c65279a54c9b2430044bf0
Notes
Notes (review): Code-Review+2: Goutham Pacha Ravi <gouthampravi@gmail.com> Code-Review+2: Mark Sturdevant <mark.sturdevant@ibm.com> Workflow+1: Mark Sturdevant <mark.sturdevant@ibm.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Mon, 30 Jan 2017 00:05:04 +0000 Reviewed-on: https://review.openstack.org/426516 Project: openstack/manila-test-image Branch: refs/heads/master
-rwxr-xr-xcommon-files/etc/init.d/S99metadata3
-rwxr-xr-xrun-buildroot.sh12
-rwxr-xr-xtest-image.sh4
-rw-r--r--tox.ini7
4 files changed, 16 insertions, 10 deletions
diff --git a/common-files/etc/init.d/S99metadata b/common-files/etc/init.d/S99metadata
index 05e69b7..cef1ad2 100755
--- a/common-files/etc/init.d/S99metadata
+++ b/common-files/etc/init.d/S99metadata
@@ -17,7 +17,8 @@ check_net() {
17json_metadata() { 17json_metadata() {
18 F=$1/ec2/2009-04-04/meta-data.json 18 F=$1/ec2/2009-04-04/meta-data.json
19 [ -f $F ] || return 19 [ -f $F ] || return
20 JSON.sh < $F | sed -n 's/^\["public-keys","[0-9]\+","openssh-key"\]\t"\(.*\)\\n"$/\1/p' 20 SCRIPT='s/^\["public-keys","[0-9]\+","openssh-key"\]\t"\(.*\)\\n"$/\1/p'
21 JSON.sh < $F | sed -n "$SCRIPT"
21} 22}
22 23
23check_cd() { 24check_cd() {
diff --git a/run-buildroot.sh b/run-buildroot.sh
index 2057007..d0cb50c 100755
--- a/run-buildroot.sh
+++ b/run-buildroot.sh
@@ -11,10 +11,12 @@
11 11
12# Grab JSON.sh for json parsing 12# Grab JSON.sh for json parsing
13JSON_VERS=e05e69a0debdba68125a33ac786726cb860b2e7b 13JSON_VERS=e05e69a0debdba68125a33ac786726cb860b2e7b
14JSON_SH=https://raw.githubusercontent.com/dominictarr/JSON.sh/$JSON_VERS/JSON.sh 14GITHUB_RAW=https://raw.githubusercontent.com
15JSON_URL=$GITHUB_RAW/dominictarr/JSON.sh/$JSON_VERS/JSON.sh
16JSON_SH=download/JSON.sh
15if [ ! -x download/JSON.sh ] ; then 17if [ ! -x download/JSON.sh ] ; then
16 curl -s $JSON_SH > download/JSON.sh 18 curl -s $JSON_URL > $JSON_SH
17 chmod +x download/JSON.sh 19 chmod +x $JSON_SH
18fi 20fi
19 21
20# Create the filesystem overlays 22# Create the filesystem overlays
@@ -22,14 +24,14 @@ if [ ! -d overlay-client ] ; then
22 mkdir overlay-client 24 mkdir overlay-client
23 cp -a common-files/* overlay-client 25 cp -a common-files/* overlay-client
24 mkdir -p overlay-client/usr/bin 26 mkdir -p overlay-client/usr/bin
25 cp download/JSON.sh overlay-server/usr/bin 27 cp $JSON_SH overlay-server/usr/bin
26fi 28fi
27if [ ! -d overlay-server ] ; then 29if [ ! -d overlay-server ] ; then
28 mkdir overlay-server 30 mkdir overlay-server
29 cp -a common-files/* overlay-server 31 cp -a common-files/* overlay-server
30 cp -a server-files/* overlay-server 32 cp -a server-files/* overlay-server
31 mkdir -p overlay-server/usr/bin 33 mkdir -p overlay-server/usr/bin
32 cp download/JSON.sh overlay-server/usr/bin 34 cp $JSON_SH overlay-server/usr/bin
33fi 35fi
34 36
35# Copy the config files where they need to go (temporarily) 37# Copy the config files where they need to go (temporarily)
diff --git a/test-image.sh b/test-image.sh
index 019f940..d85e577 100755
--- a/test-image.sh
+++ b/test-image.sh
@@ -1,5 +1,7 @@
1#!/bin/sh 1#!/bin/sh
2 2
3qemu-img create -f qcow2 -b client.qcow2 client-test.qcow2 3qemu-img create -f qcow2 -b client.qcow2 client-test.qcow2
4kvm -m 512 -monitor none -nographic -drive file=client-test.qcow2,if=virtio,format=qcow2 -netdev user,id=net0 -device virtio-net-pci,netdev=net0 4kvm -m 512 -monitor none -nographic \
5 -drive file=client-test.qcow2,if=virtio,format=qcow2 \
6 -netdev user,id=net0 -device virtio-net-pci,netdev=net0
5rm client-test.qcow2 7rm client-test.qcow2
diff --git a/tox.ini b/tox.ini
index d09399f..d9b5c88 100644
--- a/tox.ini
+++ b/tox.ini
@@ -6,11 +6,12 @@ deps = {env:BASHATE_INSTALL_PATH:bashate==0.5.1}
6 6
7[testenv:bashate] 7[testenv:bashate]
8whitelist_externals = bash 8whitelist_externals = bash
9commands = bash -c "find {toxinidir} \ 9commands = bash -c "(find {toxinidir} \
10 -not \( -type d -name .?\* -prune \) \ 10 -not \( -type d -name .?\* -prune \) \
11 -not \( -type d -name output-\* -prune \) \ 11 -not \( -type d -name output-\* -prune \) \
12 -not \( -type d -name overlay-\* -prune \) \ 12 -not \( -type d -name overlay-\* -prune \) \
13 -not \( -type d -name buildroot -prune \) \ 13 -not \( -type d -name buildroot -prune \) \
14 -not \( -type d -name download -prune \) \ 14 -not \( -type d -name download -prune \) \
15 -type f -name \*.sh \ 15 -type f -name \*.sh -print0 ; \
16 -print0 | xargs -0 bashate -v" 16 find {toxinidir}/common-files/etc/init.d \
17 -type f -print0) | xargs -0 bashate -v"