]> xenbits.xensource.com Git - osstest.git/commitdiff
Shell fixup: Make all invocations of `.' (`source') use ./
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 24 Sep 2015 15:46:44 +0000 (16:46 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 29 Sep 2015 13:33:15 +0000 (14:33 +0100)
In POSIX, `.' (the shell builtin) respects PATH, and does not search
`.' (the current directory).

Change all the invocations which refer to files which are part of
osstest to say `. ./foo' instead of simply `. foo'.

I have checked the results of
  git-grep '^[ \t]*\. [^./]'
after this patch and the remaining five hits are of no concern.

As a double-check of my hand-editing, I have also done this
  perl -i~ -pe 's#^(\s*\. )\./#$1#' *
and verified that the resulting tree is almost identical to that
before this commit.  There is one difference, where the original
code already said `. ./job'.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
25 files changed:
ap-fetch-version
ap-fetch-version-baseline
ap-fetch-version-baseline-late
ap-fetch-version-old
ap-print-url
ap-push
ap-qemu-revision
ap-qemu-url
cr-all-branch-statuses
cr-daily-branch
cr-try-bisect
cr-try-bisect-adhoc
cri-args-hostlists
cri-common
cri-lock-repos
make-distros-flight
make-flight
mg-all-branch-statuses
mg-cpu-microcode-update
mg-debian-installer-update
mg-debian-installer-update-all
mg-execute-flight
mg-pxe-loader-update
standalone
standalone-reset

index 62adf79cf4819aed6c062fdc3c6ebcd89a9696bf..086aa6295721142462ef0d268e0251ac34925f85 100755 (executable)
 set -e
 
 branch=$1
-. cri-lock-repos
-. cri-common
+. ./cri-lock-repos
+. ./cri-common
 select_xenbranch
-. ap-common
+. ./ap-common
 
 if info_linux_tree "$branch"; then
        repo_tree_rev_fetch_git linux \
index e693e16845a96fba2dd5284ad20cb222e52bb3f6..8889d1eb527013658c6a3311d375b2f9906976bd 100755 (executable)
@@ -21,7 +21,7 @@ set -e
 
 branch=$1
 
-. cri-lock-repos
+. ./cri-lock-repos
 
 : ${BASE_TREE_LINUX:=git://xenbits.xen.org/people/ianc/linux-2.6.git}
 : ${BASE_TAG_LINUX:=xen/next-2.6.32}
index ef1a8b1eb9bfedb6b8800c951c36838ddd42947a..3db443d6ea88075ee28148b5a6fd636634419bd9 100755 (executable)
@@ -22,10 +22,10 @@ set -e
 branch=$1
 new=$2
 
-. cri-lock-repos
-. cri-common
+. ./cri-lock-repos
+. ./cri-common
 select_xenbranch
-. ap-common
+. ./ap-common
 
 case "$branch" in
 
index 716fc8f0fc378c9aa9c8e65a40c97d687fa24847..9d5487a1198274e8267fe98cf315fc7cca4714c1 100755 (executable)
 set -e
 
 branch=$1
-. cri-lock-repos
-. cri-common
+. ./cri-lock-repos
+. ./cri-common
 select_xenbranch
-. ap-common
+. ./ap-common
 
 : ${BASE_TAG_LINUX2639:=tested/2.6.39.x}
 : ${BASE_LOCALREV_LINUX:=daily-cron.$branch.old}
index c161169ed3e7d39dd78a93116e0bc67f372a69f7..1b178c7efd24cf7d9e2585e86810344d6635f6f5 100755 (executable)
 set -e
 
 branch=$1
-. cri-lock-repos
-. cri-common
+. ./cri-lock-repos
+. ./cri-common
 select_xenbranch
-. ap-common
+. ./ap-common
 
 if info_linux_tree "$branch"; then
        echo $TREE_LINUX_THIS
diff --git a/ap-push b/ap-push
index aa0ec3d45db0532e32887dfafb31ae998a83f7ad..ea2188733fb1b00ca901479f442277ce5e3bf0e2 100755 (executable)
--- a/ap-push
+++ b/ap-push
@@ -21,13 +21,13 @@ set -ex
 
 branch=$1
 revision=$2
-. cri-lock-repos
-. cri-common
+. ./cri-lock-repos
+. ./cri-common
 select_xenbranch
 
 : ${TAG_LINUX2639:=tested/2.6.39.x}
 
-. ap-common
+. ./ap-common
 
 TREE_LINUX=$PUSH_TREE_LINUX
 TREE_QEMU_MAINLINE=$PUSH_TREE_QEMU_MAINLINE
index abfa65086b4bec94d60d9a0ff8595c79d47d7329..de105caa080caf0ee61cfe319c4be015d2a0f77f 100755 (executable)
@@ -22,8 +22,8 @@ set -e
 xenbranch=$1
 xenrevision=$2
 
-. cri-lock-repos
-. ap-common
+. ./cri-lock-repos
+. ./ap-common
 
 cd "$repos/xen"
 git cat-file blob $xenrevision:Config.mk | perl -ne '
index 1161a463fbfed2d8129c03923a44668e7aed655d..6ed704a5fd5985a98dccf0436088b9e3990de364 100755 (executable)
@@ -21,7 +21,7 @@ set -e
 
 xenbranch=$1
 
-. cri-lock-repos
-. ap-common
+. ./cri-lock-repos
+. ./ap-common
 
 echo $TREE_QEMU
index f9885db11ddcc1896fc82f59e3318aba4dc29632..f4ed46eb9094aa8051b40bca5101b1519f61a7da 100755 (executable)
@@ -18,7 +18,7 @@
 
 set -ex
 
-. cri-args-hostlists
+. ./cri-args-hostlists
 branch=$1; shift
 
 check_stop all-branch-statuses.
index dd9c30aecefc053711b0cdaacb1eb6bd5464e99a..06f4b38f0eded071a23dd3a548719bb4844db46d 100755 (executable)
@@ -19,8 +19,8 @@
 
 set -ex
 
-. cri-args-hostlists
-. ap-common
+. ./cri-args-hostlists
+. ./ap-common
 branch=$1; shift
 select_branch
 info_linux_tree $branch ||:
index 8f0053720fba14ba41d28cfd8aa5d2709811cbdd..06c494098b4a6395be9136024b3e433d01cd9f8b 100755 (executable)
@@ -19,8 +19,8 @@
 
 set -ex
 
-. cri-bisect
-. cri-args-hostlists
+. ./cri-bisect
+. ./cri-args-hostlists
 
 branch=$1; shift
 select_branch
index c34c74c0411b095e40b8c5f8429b24bc560b6d4d..4ff8b8c8be740801d993d5ee8c57d4912a41b25b 100755 (executable)
@@ -21,7 +21,7 @@ set -ex
 
 export OSSTEST_BLESSING=adhoc
 
-. cri-common
+. ./cri-common
 
 nope () { echo "nope: $*"; exit 0; }
 
@@ -34,8 +34,8 @@ if ! test -f job; then nope "no job"; exit 0; fi
 #   testid=
 #   bisect= list of args to cs-bisection-step, eg  '--fail-flight=<mumble>'
 
-. cri-bisect
-. cri-args-hostlists
+. ./cri-bisect
+. ./cri-args-hostlists
 select_branch
 
 export OSSTEST_BLESSING=adhoc
index 0dd2ef37ac634dd42e5f483f08d459be9d718e0f..58a22522d79c8720be2ec839c67eb1ba6d97f9a7 100644 (file)
@@ -34,13 +34,13 @@ check_stop () {
        check_stop_core "$1"
        if test -f ${1}xsettings; then
                echo "loading ${1}xsettings"
-               . ${1}xsettings
+               . ./${1}xsettings
        fi
 }
 
 check_stop ''
 
-. cri-common
+. ./cri-common
 
 dcs=daily-cron-settings
 
@@ -56,7 +56,7 @@ fi
 
 : ${OSSTEST_EMAIL_HEADER:=daily-cron-email-$OSSTEST_BLESSING}
 
-. ${OSSTEST_CRON_SETTINGS:-$dcs-$OSSTEST_BLESSING}
+. ./${OSSTEST_CRON_SETTINGS:-$dcs-$OSSTEST_BLESSING}
 
 : ${OSSTEST_PUSH:=false}
 
index c874ff913d2a9e84d78cc9a9b91e72e60f3ec932..6dfe8dffe00458946c11c754f18d550cede5a3e0 100644 (file)
@@ -17,7 +17,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-. cri-getconfig
+. ./cri-getconfig
 
 umask 002
 
@@ -101,6 +101,6 @@ select_branch () {
        mrof="$branch.mro"
 
        if test -f branch-settings.$branch; then
-               . branch-settings.$branch
+               . ./branch-settings.$branch
        fi
 }
index c8269f35e36897ac375df339bec0b09e8d5cd19c..e75e3f59563888c2a34f9873eeb676fa9e86ebdf 100644 (file)
@@ -17,7 +17,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-. cri-common
+. ./cri-common
 
 repos=`getrepos`
 repos_lock="$repos/lock"
index d407fcbe864a2d4133459041764dfcec8c92731f..697a17158120457534b4b8a088752abfeaab7226 100755 (executable)
@@ -26,9 +26,9 @@ buildflight=$4
 
 flight=`./cs-flight-create $blessing $branch`
 
-. cri-common
-. ap-common
-. mfi-common
+. ./cri-common
+. ./ap-common
+. ./mfi-common
 
 defsuite=`getconfig DebianSuite`
 defguestsuite=`getconfig GuestDebianSuite`
index 70c909d49dca0b329dd1d31a951db8150484b60d..8dc4e64cbb98c6ebbdb23f2c0dc995628f53e94e 100755 (executable)
@@ -26,10 +26,10 @@ buildflight=$4
 
 flight=`./cs-flight-create $blessing $branch`
 
-. cri-common
-. cri-getplatforms
-. ap-common
-. mfi-common
+. ./cri-common
+. ./cri-getplatforms
+. ./ap-common
+. ./mfi-common
 
 defsuite=`getconfig DebianSuite`
 defguestsuite=`getconfig GuestDebianSuite`
index bba7216f000ae35ffbc8466a5d81cf1ae1953272..74dc09a31dd17c15057e923e75a25d18553e649e 100755 (executable)
@@ -27,7 +27,7 @@
 
 set -e
 
-. cri-common
+. ./cri-common
 
 mkdir -p tmp
 
index c375a43a0a8e0c24567e78c875421293f582af74..4d51dfbcc993606d454774fd95c9c8435d69ad02 100755 (executable)
@@ -2,8 +2,8 @@
 
 set -e
 
-. cri-getconfig
-. mgi-common
+. ./cri-getconfig
+. ./mgi-common
 
 # iucode_tool is in /usr/sbin, see #788459.
 export PATH="/usr/local/sbin:$PATH:/sbin:/usr/sbin"
index 526cdf1c2c6fcad172a917474cc6206b1a69645e..6070b8aba8b94510017d689e3e433aba6289f70d 100755 (executable)
@@ -21,8 +21,8 @@
 
 set -e
 
-. cri-getconfig
-. mgi-common
+. ./cri-getconfig
+. ./mgi-common
 
 suite=$1
 arch=$2
index 241e2e3fc335b3bbed193227df8081449f495cd6..1bbaef7ac578d4cb1166d93dc82d21b8ada13aed 100755 (executable)
@@ -20,7 +20,7 @@
 
 set -e
 
-. cri-getconfig
+. ./cri-getconfig
 
 suite=`getconfig DebianSuite`
 fws=`getconfig DebianNonfreeFirmware`
index 7f3d969bbe75003ac710f119846c4c026f77538d..0d8c792f24341c1f40fdb6b0df5b34d1c8a2f7db 100755 (executable)
@@ -48,7 +48,7 @@ while [ $# != 0 ]; do
        esac
 done
 
-. cri-getconfig
+. ./cri-getconfig
 
 if [ x"$flight" = x ]; then badusage; fi
 
index 386e449c6ee85c3437640b116e9cfb1ed5cd3e70..9774350bdf13637bad3c634e14de95898856d853 100755 (executable)
@@ -23,8 +23,8 @@
 
 set -e
 
-. cri-getconfig
-. mgi-common
+. ./cri-getconfig
+. ./mgi-common
 
 suite=$1
 
index 60b66662347acaa18a8bda20f9492ca0f970ec37..9383d720f8bd95d6fbc3299707286eb0a029dd46 100755 (executable)
@@ -123,7 +123,7 @@ while true ; do
     esac
 done
 
-. cri-getconfig
+. ./cri-getconfig
 
 WebspaceLog=`OSSTEST_CONFIG=$config getconfig WebspaceLog`
 if [ ! -r "$WebspaceLog" ] ; then
index 85550394259f95289a7bbd2c699c8db0bd3d2cb2..0a69915bb9c2b98756c3226fa25bfc0c13626526 100755 (executable)
@@ -37,10 +37,10 @@ done
 shift $((OPTIND-1))
 
 if [ -f standalone.config ] ; then
-    . standalone.config
+    . ./standalone.config
 fi
 
-. cri-getconfig
+. ./cri-getconfig
 
 jobdb=`getconfig JobDB`
 if [ "$jobdb" != Standalone ]; then