[act,v2] UBUNTU: SAUCE: ubuntu_btrfs_kernel_fixes: fix "if" statement
diff mbox series

Message ID 20190916143618.13157-1-jesse.sung@canonical.com
State New
Headers show
Series
  • [act,v2] UBUNTU: SAUCE: ubuntu_btrfs_kernel_fixes: fix "if" statement
Related show

Commit Message

Wen-chien Jesse Sung Sept. 16, 2019, 2:36 p.m. UTC
BugLink: https://launchpad.net/bugs/1813534

The test complains about "line 58: [: -gt: unary operator expected".

Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>
---
 .../fixes/b9a8cc5bef963b76c5b6c3016b7e91988a3e758b.sh           | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Po-Hsu Lin Sept. 17, 2019, 2:45 p.m. UTC | #1
As we're using bash for the test, double brackets should be OK here.
And it's just looking for any error, so the number of errors is not
important.

Applied and pushed.

Thanks
Sam

Patch
diff mbox series

diff --git a/ubuntu_btrfs_kernel_fixes/fixes/b9a8cc5bef963b76c5b6c3016b7e91988a3e758b.sh b/ubuntu_btrfs_kernel_fixes/fixes/b9a8cc5bef963b76c5b6c3016b7e91988a3e758b.sh
index c3bd6a7..4169ce2 100755
--- a/ubuntu_btrfs_kernel_fixes/fixes/b9a8cc5bef963b76c5b6c3016b7e91988a3e758b.sh
+++ b/ubuntu_btrfs_kernel_fixes/fixes/b9a8cc5bef963b76c5b6c3016b7e91988a3e758b.sh
@@ -55,7 +55,7 @@  wait $pid
 
 umount $DEV0
 n=$(btrfsck $DEV0 | grep "errors")
-if [ $n -gt 0 ]; then
+if [[ "$n" != "" ]]; then
 	echo "failed, btrfsck found some errors"
 	rc=1
 else