Patchwork [4/7] mkdebugfs.sh: convert the tab to 4 spaces

login
register
mail settings
Submitter Robert Yang
Date Feb. 26, 2013, 9:24 a.m.
Message ID <04ccee436225f0a27f74cb9e7cb7b94b3796c965.1361862860.git.liezhi.yang@windriver.com>
Download mbox | patch
Permalink /patch/45109/
State New
Headers show

Comments

Robert Yang - Feb. 26, 2013, 9:24 a.m.
[YOCTO #3848]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 .../e2fsprogs/e2fsprogs/mkdebugfs.sh               | 74 +++++++++++-----------
 1 file changed, 37 insertions(+), 37 deletions(-)
Darren Hart - Feb. 26, 2013, 10:59 p.m.
And NACK on this one :-)

Shell scripts should use tabs.

--
Darren

On 02/26/2013 01:24 AM, Robert Yang wrote:
> [YOCTO #3848]
> 
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
>  .../e2fsprogs/e2fsprogs/mkdebugfs.sh               | 74 +++++++++++-----------
>  1 file changed, 37 insertions(+), 37 deletions(-)
> 
> diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdebugfs.sh b/meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdebugfs.sh
> index 5dfa380..41a13cb 100644
> --- a/meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdebugfs.sh
> +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdebugfs.sh
> @@ -6,44 +6,44 @@ DEBUGFS="debugfs/debugfs"
>  yes | mkfs.ext4 test.img
>  
>  {
> -	CWD="/"
> -	find $SRCDIR | while read FILE; do
> -		#TGT=${FILE#$SRCDIR}
> -		TGT=$(basename "${FILE#$SRCDIR}")
> -		DIR=$(dirname "${FILE#$SRCDIR}")
> +    CWD="/"
> +    find $SRCDIR | while read FILE; do
> +        #TGT=${FILE#$SRCDIR}
> +        TGT=$(basename "${FILE#$SRCDIR}")
> +        DIR=$(dirname "${FILE#$SRCDIR}")
>  
> -		# Skip the root dir
> -		if [ -z "$TGT" ]; then
> -			continue
> -		fi
> +        # Skip the root dir
> +        if [ -z "$TGT" ]; then
> +            continue
> +        fi
>  
> -		if [ "$DIR" != "$CWD" ]; then
> -			echo "cd $DIR"
> -			CWD="$DIR"
> -		fi
> +        if [ "$DIR" != "$CWD" ]; then
> +            echo "cd $DIR"
> +            CWD="$DIR"
> +        fi
>  
> -		case $(stat -c "%F" $FILE) in
> -		"directory")
> -			echo "mkdir $TGT"
> -			;;
> -		"regular file")
> -			echo "write $FILE $TGT"
> -			;;
> -		"symbolic link")
> -			LINK_TGT=$(ls -l $FILE | sed -e 's/.*-> //')
> -			echo "symlink $TGT $LINK_TGT"
> -			;;
> -		"block special file")
> -			DEVNO=$(stat -c "%t %T" $FILE)
> -			echo "mknod $TGT b $DEVNO"
> -			;;
> -		"character special file")
> -			DEVNO=$(stat -c "%t %T" $FILE)
> -			echo "mknod $TGT c $DEVNO"
> -			;;
> -		*)
> -			echo "Unknown file $FILE" 1>&2
> -			;;
> -		esac
> -	done
> +        case $(stat -c "%F" $FILE) in
> +        "directory")
> +            echo "mkdir $TGT"
> +            ;;
> +        "regular file")
> +            echo "write $FILE $TGT"
> +            ;;
> +        "symbolic link")
> +            LINK_TGT=$(ls -l $FILE | sed -e 's/.*-> //')
> +            echo "symlink $TGT $LINK_TGT"
> +            ;;
> +        "block special file")
> +            DEVNO=$(stat -c "%t %T" $FILE)
> +            echo "mknod $TGT b $DEVNO"
> +            ;;
> +        "character special file")
> +            DEVNO=$(stat -c "%t %T" $FILE)
> +            echo "mknod $TGT c $DEVNO"
> +            ;;
> +        *)
> +            echo "Unknown file $FILE" 1>&2
> +            ;;
> +        esac
> +    done
>  } | $DEBUGFS -w -f /dev/stdin $DEVICE
>

Patch

diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdebugfs.sh b/meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdebugfs.sh
index 5dfa380..41a13cb 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdebugfs.sh
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdebugfs.sh
@@ -6,44 +6,44 @@  DEBUGFS="debugfs/debugfs"
 yes | mkfs.ext4 test.img
 
 {
-	CWD="/"
-	find $SRCDIR | while read FILE; do
-		#TGT=${FILE#$SRCDIR}
-		TGT=$(basename "${FILE#$SRCDIR}")
-		DIR=$(dirname "${FILE#$SRCDIR}")
+    CWD="/"
+    find $SRCDIR | while read FILE; do
+        #TGT=${FILE#$SRCDIR}
+        TGT=$(basename "${FILE#$SRCDIR}")
+        DIR=$(dirname "${FILE#$SRCDIR}")
 
-		# Skip the root dir
-		if [ -z "$TGT" ]; then
-			continue
-		fi
+        # Skip the root dir
+        if [ -z "$TGT" ]; then
+            continue
+        fi
 
-		if [ "$DIR" != "$CWD" ]; then
-			echo "cd $DIR"
-			CWD="$DIR"
-		fi
+        if [ "$DIR" != "$CWD" ]; then
+            echo "cd $DIR"
+            CWD="$DIR"
+        fi
 
-		case $(stat -c "%F" $FILE) in
-		"directory")
-			echo "mkdir $TGT"
-			;;
-		"regular file")
-			echo "write $FILE $TGT"
-			;;
-		"symbolic link")
-			LINK_TGT=$(ls -l $FILE | sed -e 's/.*-> //')
-			echo "symlink $TGT $LINK_TGT"
-			;;
-		"block special file")
-			DEVNO=$(stat -c "%t %T" $FILE)
-			echo "mknod $TGT b $DEVNO"
-			;;
-		"character special file")
-			DEVNO=$(stat -c "%t %T" $FILE)
-			echo "mknod $TGT c $DEVNO"
-			;;
-		*)
-			echo "Unknown file $FILE" 1>&2
-			;;
-		esac
-	done
+        case $(stat -c "%F" $FILE) in
+        "directory")
+            echo "mkdir $TGT"
+            ;;
+        "regular file")
+            echo "write $FILE $TGT"
+            ;;
+        "symbolic link")
+            LINK_TGT=$(ls -l $FILE | sed -e 's/.*-> //')
+            echo "symlink $TGT $LINK_TGT"
+            ;;
+        "block special file")
+            DEVNO=$(stat -c "%t %T" $FILE)
+            echo "mknod $TGT b $DEVNO"
+            ;;
+        "character special file")
+            DEVNO=$(stat -c "%t %T" $FILE)
+            echo "mknod $TGT c $DEVNO"
+            ;;
+        *)
+            echo "Unknown file $FILE" 1>&2
+            ;;
+        esac
+    done
 } | $DEBUGFS -w -f /dev/stdin $DEVICE