mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 12:59:02 +02:00
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>
This commit is contained in:
parent
ed12917d59
commit
79236477a1
|
@ -85,7 +85,7 @@ def _prepare_remote_script(deploy, verbose=False, dryrun=False, undeployall=Fals
|
|||
lines.append('do')
|
||||
lines.append(' checkpath=`dirname "$checkpath"`')
|
||||
lines.append('done')
|
||||
lines.append('freespace=`df -P $checkpath | sed "1d" | awk \'{ print $4 }\'`')
|
||||
lines.append(r'freespace=$(df -P $checkpath | sed -nre "s/^(\S+\s+){3}([0-9]+).*/\2/p")')
|
||||
# First line of the file is the total space
|
||||
lines.append('total=`head -n1 $3`')
|
||||
lines.append('if [ $total -gt $freespace ] ; then')
|
||||
|
|
Loading…
Reference in New Issue
Block a user