summary refs log tree commit diff
diff options
context:
space:
mode:
authorPiotr Wójcik <chocimier@tlen.pl>2018-11-06 23:04:37 +0100
committerLeah Neukirchen <leah@vuxu.org>2018-12-01 20:09:40 +0100
commit8dc332c47f677a1caeb6a642de433d8d6e083814 (patch)
tree62e66229acc07c9f1b4479cd4210ca3a0a50f2d2
parent5edebea0a738117dde41077cd23756e79f4417e7 (diff)
downloadxtools-8dc332c47f677a1caeb6a642de433d8d6e083814.tar.gz
xtools-8dc332c47f677a1caeb6a642de433d8d6e083814.tar.xz
xtools-8dc332c47f677a1caeb6a642de433d8d6e083814.zip
xlint: warn when variables should be placed at end
-rwxr-xr-xxlint4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlint b/xlint
index f696f8e..e57cf98 100755
--- a/xlint
+++ b/xlint
@@ -81,7 +81,7 @@ variables_order() {
 		esac
 
 		if [ "$variables_end" ]; then
-			return
+			break
 		elif [ "$curr_index" -lt "$max_index" ]; then
 			message="$template: Place $max_index_line= after ${line%%=*}="
 		elif [ "$curr_index" -gt "$max_index" ]; then
@@ -93,7 +93,7 @@ variables_order() {
 			fi
 		fi
 	done < "$template"
-	[ -n "$message" ] && echo "$message"
+	[ "$message" ] && echo "$message"
 }
 
 variables=$(echo -n "#.*