summaryrefslogtreecommitdiffstats
path: root/scripts/lib
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2016-09-30 21:53:40 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-10-05 10:10:11 +0100
commit79236477a15e84393ce8fdd8427f4ebee5ec8160 (patch)
tree075d8bd9c41426e4bbdc8ea3e654eb6e481a7e91 /scripts/lib
parented12917d59cd454246508845ce4c6548ca9ace1b (diff)
downloadpoky-79236477a15e84393ce8fdd8427f4ebee5ec8160.tar.gz
devtool: deploy-target: Avoid unnecessary dependency on awk on the target
Relying on that awk is installed on the target just to extract the fourth column (i.e., the free volume size) from `df -P` is an unnecessary dependency for devtool deploy-target. As it is already using sed to mangle the output from `df -P`, this can easily be modified to only extract the free volume size. (From OE-Core rev: 7bab454b0bf0075fbb2a5de06286a9da1df2adc6) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-rw-r--r--scripts/lib/devtool/deploy.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/lib/devtool/deploy.py b/scripts/lib/devtool/deploy.py
index fb84f2dd08..c4c7bf6c73 100644
--- a/scripts/lib/devtool/deploy.py
+++ b/scripts/lib/devtool/deploy.py
@@ -85,7 +85,7 @@ def _prepare_remote_script(deploy, verbose=False, dryrun=False, undeployall=Fals
85 lines.append('do') 85 lines.append('do')
86 lines.append(' checkpath=`dirname "$checkpath"`') 86 lines.append(' checkpath=`dirname "$checkpath"`')
87 lines.append('done') 87 lines.append('done')
88 lines.append('freespace=`df -P $checkpath | sed "1d" | awk \'{ print $4 }\'`') 88 lines.append(r'freespace=$(df -P $checkpath | sed -nre "s/^(\S+\s+){3}([0-9]+).*/\2/p")')
89 # First line of the file is the total space 89 # First line of the file is the total space
90 lines.append('total=`head -n1 $3`') 90 lines.append('total=`head -n1 $3`')
91 lines.append('if [ $total -gt $freespace ] ; then') 91 lines.append('if [ $total -gt $freespace ] ; then')