Browse Source

Remove unnecessary quotes and semicolons

Where not required, they only add visual cruft.
Alois Mahdal 7 years ago
parent
commit
3b35bb9513
6 changed files with 25 additions and 25 deletions
  1. 7
    7
      src/include/build.sh
  2. 4
    4
      src/include/deploy.sh
  3. 3
    3
      src/include/facts.sh
  4. 8
    8
      src/include/ini.sh
  5. 1
    1
      src/include/mkit.sh
  6. 2
    2
      src/include/release.sh

+ 7
- 7
src/include/build.sh View File

8
     #
8
     #
9
     # Process one skeleton
9
     # Process one skeleton
10
     #
10
     #
11
-    local srcpath="$1"
12
-    local dstpath="$2"
13
-    local ftype="$3"
11
+    local srcpath=$1
12
+    local dstpath=$2
13
+    local ftype=$3
14
     test -n "$dstpath"  || dstpath=${srcpath%.skel}
14
     test -n "$dstpath"  || dstpath=${srcpath%.skel}
15
     test -n "$ftype"    || ftype=$(_guess_ftype "$dstpath")
15
     test -n "$ftype"    || ftype=$(_guess_ftype "$dstpath")
16
     debug_var srcpath dstpath ftype
16
     debug_var srcpath dstpath ftype
23
     #
23
     #
24
     # Build a file of type $1
24
     # Build a file of type $1
25
     #
25
     #
26
-    local ftype="$1"
26
+    local ftype=$1
27
     case $ftype in
27
     case $ftype in
28
         MKIT_COMMON)    _expand_tokens "tokens" ;;
28
         MKIT_COMMON)    _expand_tokens "tokens" ;;
29
         markdown)       _expand_includes | _expand_tokens "tokens" ;;
29
         markdown)       _expand_includes | _expand_tokens "tokens" ;;
93
     #
93
     #
94
     # Guess file type from destination path $1
94
     # Guess file type from destination path $1
95
     #
95
     #
96
-    local dstpath="$1"
96
+    local dstpath=$1
97
     case $dstpath in
97
     case $dstpath in
98
         *.md) echo markdown    ;;
98
         *.md) echo markdown    ;;
99
         *)    echo MKIT_COMMON ;;
99
         *)    echo MKIT_COMMON ;;
209
     #
209
     #
210
     # Build specfile
210
     # Build specfile
211
     #
211
     #
212
-    local specname="$MKIT_PROJ_PKGNAME.spec"
213
-    local specsrc="$(ini 1value "dist:rpmstuff")"
212
+    local specname=$MKIT_PROJ_PKGNAME.spec
213
+    local specsrc=$(ini 1value "dist:rpmstuff")
214
     test -n "$specsrc" || die "dist:rpmstuff not specified"
214
     test -n "$specsrc" || die "dist:rpmstuff not specified"
215
     test -f "$specsrc" || die "specfile template not found: $specsrc"
215
     test -f "$specsrc" || die "specfile template not found: $specsrc"
216
     _build1 "$specsrc" "$specname"
216
     _build1 "$specsrc" "$specname"

+ 4
- 4
src/include/deploy.sh View File

23
     # Directories are copied recursively, and mode is
23
     # Directories are copied recursively, and mode is
24
     # applied only to files.
24
     # applied only to files.
25
     #
25
     #
26
-    local src="$1"
27
-    local dst="$2"
28
-    local mode="${3:-$MKIT_DEFAULT_MODE}"
26
+    local src=$1
27
+    local dst=$2
28
+    local mode=${3:-$MKIT_DEFAULT_MODE}
29
     if test -d "$src";
29
     if test -d "$src";
30
     then
30
     then
31
         _maybe mkdir -vp "$(dirname "$dst")"
31
         _maybe mkdir -vp "$(dirname "$dst")"
55
     #
55
     #
56
     # Find out target root for group $1
56
     # Find out target root for group $1
57
     #
57
     #
58
-    local grp="$1"
58
+    local grp=$1
59
     local root=$(ini 1value "roots:$grp")
59
     local root=$(ini 1value "roots:$grp")
60
     local destdir=$(ini 1value ENV:DESTDIR)
60
     local destdir=$(ini 1value ENV:DESTDIR)
61
     destdir=${destdir%/}
61
     destdir=${destdir%/}

+ 3
- 3
src/include/facts.sh View File

6
     #
6
     #
7
     # Get git bool (ie. exit status counts) $1
7
     # Get git bool (ie. exit status counts) $1
8
     #
8
     #
9
-    local bool_name="$1"
9
+    local bool_name=$1
10
     git_present || warn "can't give bool outside git repo: $bool_name"
10
     git_present || warn "can't give bool outside git repo: $bool_name"
11
     case "$bool_name" in
11
     case "$bool_name" in
12
         dirty_files)
12
         dirty_files)
29
     #
29
     #
30
     # Get git fact $1
30
     # Get git fact $1
31
     #
31
     #
32
-    local fact_name="$1"
32
+    local fact_name=$1
33
     git_present || warn "can't give fact outside git repo: $fact_name"
33
     git_present || warn "can't give fact outside git repo: $fact_name"
34
     case "$fact_name" in
34
     case "$fact_name" in
35
         latest_tag)
35
         latest_tag)
165
             0:)  suffix="+dirty"         ;;
165
             0:)  suffix="+dirty"         ;;
166
             1:*) suffix="+$commit"       ;;
166
             1:*) suffix="+$commit"       ;;
167
             0:*) suffix="+$commit.dirty" ;;
167
             0:*) suffix="+$commit.dirty" ;;
168
-            *)   suffix=MKIT_BUG;
168
+            *)   suffix=MKIT_BUG
169
                  warn "MKIT_BUG: bad dirt/commit detection" ;;
169
                  warn "MKIT_BUG: bad dirt/commit detection" ;;
170
         esac
170
         esac
171
         test -n "$prerl" && suffix="-$prerl$suffix"
171
         test -n "$prerl" && suffix="-$prerl$suffix"

+ 8
- 8
src/include/ini.sh View File

48
     #     [files:share]
48
     #     [files:share]
49
     #         my/lib.sh   = proj/my/lib.sh
49
     #         my/lib.sh   = proj/my/lib.sh
50
     #
50
     #
51
-    local wnt="$1"
52
-    local wntkey="${wnt##*:}"
53
-    local wntsec="${wnt%:$wntkey}"
51
+    local wnt=$1
52
+    local wntkey=${wnt##*:}
53
+    local wntsec=${wnt%:$wntkey}
54
     if test "$wntsec" = 'ENV';
54
     if test "$wntsec" = 'ENV';
55
     then
55
     then
56
-        local override="${!wntkey}"
56
+        local override=${!wntkey}
57
         if test -n "$override";
57
         if test -n "$override";
58
         then
58
         then
59
             echo "$override"
59
             echo "$override"
67
     #
67
     #
68
     # Read one INI section
68
     # Read one INI section
69
     #
69
     #
70
-    local wnt="$1"
70
+    local wnt=$1
71
     local ok=false
71
     local ok=false
72
     grep '.' \
72
     grep '.' \
73
       | grep -v '\s*#' \
73
       | grep -v '\s*#' \
87
     #
87
     #
88
     # List keys from a section
88
     # List keys from a section
89
     #
89
     #
90
-    local sct="$1"
90
+    local sct=$1
91
     _ini_grepsec "$sct" | cut -d= -f1 | sort | uniq
91
     _ini_grepsec "$sct" | cut -d= -f1 | sort | uniq
92
 }
92
 }
93
 
93
 
125
     #
125
     #
126
     # Change project.version in mkit.ini at path $2 to version $1
126
     # Change project.version in mkit.ini at path $2 to version $1
127
     #
127
     #
128
-    local version="$1"
129
-    local inifile="$2"
128
+    local version=$1
129
+    local inifile=$2
130
     local tmp=$(mktemp -t mkit.update_version.XXXXXXXX)
130
     local tmp=$(mktemp -t mkit.update_version.XXXXXXXX)
131
     <"$inifile" perl -e '
131
     <"$inifile" perl -e '
132
         my $hit = 0;
132
         my $hit = 0;

+ 1
- 1
src/include/mkit.sh View File

66
     # the x.  Fragments must equal.
66
     # the x.  Fragments must equal.
67
     #
67
     #
68
     local their_ver our_x our_y their_x their_y
68
     local their_ver our_x our_y their_x their_y
69
-    their_ver="$1"
69
+    their_ver=$1
70
     their_x=${their_ver%%.*}
70
     their_x=${their_ver%%.*}
71
     their_y=${their_ver##$their_x.}
71
     their_y=${their_ver##$their_x.}
72
     their_y=${their_y%%.*}
72
     their_y=${their_y%%.*}

+ 2
- 2
src/include/release.sh View File

28
     #
28
     #
29
     # Die if blocking condition $1 is detected
29
     # Die if blocking condition $1 is detected
30
     #
30
     #
31
-    local condition="$1"
31
+    local condition=$1
32
     local x
32
     local x
33
     case "$condition" in
33
     case "$condition" in
34
         git_present)
34
         git_present)
127
 }
127
 }
128
 
128
 
129
 _vbump() {
129
 _vbump() {
130
-    local rlevel="$1"
130
+    local rlevel=$1
131
     local nextver   # after the bump
131
     local nextver   # after the bump
132
     _relck git_present
132
     _relck git_present
133
     _relck at_relsrc
133
     _relck at_relsrc