Browse Source

metaflac-field2field: reindent with 4 spaces

master
Matteo Cypriani 1 year ago
parent
commit
22783997cc
1 changed files with 32 additions and 32 deletions
  1. 32
    32
      audio/metaflac-field2field.sh

+ 32
- 32
audio/metaflac-field2field.sh View File

@@ -20,27 +20,27 @@
20 20
 
21 21
 print_usage()
22 22
 {
23
-	echo "Usage:"
24
-	echo "  $0 <ACTION> <SRC_FIELD> <DST_FIELD> <FILE.flac> [ <FILE2.flac> [...] ]"
25
-	echo "<ACTION> : copy | move | rmcopy | mvcopy"
26
-	echo "  copy: each occurrence of SRC_FIELD is duplicated to create an occurrence of"
27
-	echo "        DST_FIELD; all the existing occurrences of SRC_FIELD and DST_FIELD are"
28
-	echo "        kept."
29
-	echo "  move: each occurrence of SRC_FIELD is renamed to create an occurrence of"
30
-	echo "        DST_FIELD; the existing occurrences of DST_FIELD are kept."
31
-	echo "  rmcopy: the existing occurrences of DST_FIELD are deleted, then each"
32
-	echo "          occurrence of SRC_FIELD is duplicated to create an occurrence"
33
-	echo "          of DST_FIELD; the occurrences of SRC_FIELD are kept."
34
-	echo "  rmmove: the existing occurrences of DST_FIELD are deleted, then each"
35
-	echo "          occurrence of SRC_FIELD is renamed to create an occurrence of"
36
-	echo "          DST_FIELD."
37
-	exit 1
23
+    echo "Usage:"
24
+    echo "  $0 <ACTION> <SRC_FIELD> <DST_FIELD> <FILE.flac> [ <FILE2.flac> [...] ]"
25
+    echo "<ACTION> : copy | move | rmcopy | mvcopy"
26
+    echo "  copy: each occurrence of SRC_FIELD is duplicated to create an occurrence of"
27
+    echo "        DST_FIELD; all the existing occurrences of SRC_FIELD and DST_FIELD are"
28
+    echo "        kept."
29
+    echo "  move: each occurrence of SRC_FIELD is renamed to create an occurrence of"
30
+    echo "        DST_FIELD; the existing occurrences of DST_FIELD are kept."
31
+    echo "  rmcopy: the existing occurrences of DST_FIELD are deleted, then each"
32
+    echo "          occurrence of SRC_FIELD is duplicated to create an occurrence"
33
+    echo "          of DST_FIELD; the occurrences of SRC_FIELD are kept."
34
+    echo "  rmmove: the existing occurrences of DST_FIELD are deleted, then each"
35
+    echo "          occurrence of SRC_FIELD is renamed to create an occurrence of"
36
+    echo "          DST_FIELD."
37
+    exit 1
38 38
 }
39 39
 
40 40
 # Right number of arguments?
41 41
 if [ $# -lt 4 ] ; then
42
-	echo "Wrong number of arguments!"
43
-	print_usage
42
+    echo "Wrong number of arguments!"
43
+    print_usage
44 44
 fi
45 45
 
46 46
 ACTION=$1
@@ -48,11 +48,11 @@ shift
48 48
 
49 49
 # Known action type?
50 50
 case $ACTION in
51
-	copy) ;;
52
-	move) ;;
53
-	rmcopy) ;;
54
-	rmmove) ;;
55
-	*) echo "Action unknown \"$ACTION\"!" ; print_usage ;;
51
+    copy) ;;
52
+    move) ;;
53
+    rmcopy) ;;
54
+    rmmove) ;;
55
+    *) echo "Action unknown \"$ACTION\"!" ; print_usage ;;
56 56
 esac
57 57
 
58 58
 SRC_FIELD=$1
@@ -67,21 +67,21 @@ echo "Action: $ACTION"
67 67
 echo "Processing files..."
68 68
 
69 69
 if echo $ACTION | egrep '^rm' >/dev/null ; then
70
-	echo "Deleting field $DST_FIELD on each file..."
71
-	metaflac --remove-tag=$DST_FIELD "$@"
70
+    echo "Deleting field $DST_FIELD on each file..."
71
+    metaflac --remove-tag=$DST_FIELD "$@"
72 72
 fi
73 73
 
74 74
 for file in "$@" ; do
75
-	echo "Setting field \"$DST_FIELD\" on file: $file"
76
-	metaflac --show-tag=$SRC_FIELD "$file" | sed 's/^[A-Z]\+=//' | while read c1 ; do
77
-		echo "Adding $DST_FIELD=$c1..."
78
-		metaflac --set-tag=$DST_FIELD="$c1" "$file"
79
-	done
75
+    echo "Setting field \"$DST_FIELD\" on file: $file"
76
+    metaflac --show-tag=$SRC_FIELD "$file" | sed 's/^[A-Z]\+=//' | while read c1 ; do
77
+    echo "Adding $DST_FIELD=$c1..."
78
+    metaflac --set-tag=$DST_FIELD="$c1" "$file"
79
+done
80 80
 done
81 81
 
82 82
 if echo $ACTION | egrep 'move$' >/dev/null ; then
83
-	echo "Deleting $SRC_FIELD on each file..."
84
-	metaflac --remove-tag=$SRC_FIELD "$@"
83
+    echo "Deleting $SRC_FIELD on each file..."
84
+    metaflac --remove-tag=$SRC_FIELD "$@"
85 85
 fi
86 86
 
87
-# vim: expandtab!:ts=2
87
+# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4

Loading…
Cancel
Save