[pacman-dev] [PATCH 2/6] scripts: Remove trailing semicolons

Jan Alexander Steffens (heftig) jan.steffens at gmail.com
Tue Jun 19 20:33:57 UTC 2018


---
 scripts/completion/bash_completion.in              |  2 +-
 scripts/completion/zsh_completion.in               |  8 ++++----
 .../libmakepkg/integrity/verify_signature.sh.in    |  2 +-
 scripts/libmakepkg/util/util.sh.in                 |  2 +-
 scripts/makepkg.sh.in                              | 14 +++++++-------
 scripts/pacman-key.sh.in                           |  6 +++---
 scripts/repo-add.sh.in                             |  2 +-
 7 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/scripts/completion/bash_completion.in b/scripts/completion/bash_completion.in
index d750e12f..d99fba53 100644
--- a/scripts/completion/bash_completion.in
+++ b/scripts/completion/bash_completion.in
@@ -131,7 +131,7 @@ _pacman() {
       D|R)
           _pacman_pkg Qq;;
       F)
-          _arch_incomp 'l list'   && _pacman_pkg Slq;
+          _arch_incomp 'l list'   && _pacman_pkg Slq
           ;;
       Q)
         { _arch_incomp 'g groups' && _pacman_pkg Qg sort; }    ||
diff --git a/scripts/completion/zsh_completion.in b/scripts/completion/zsh_completion.in
index 77449955..c114ae02 100644
--- a/scripts/completion/zsh_completion.in
+++ b/scripts/completion/zsh_completion.in
@@ -370,7 +370,7 @@ _pacman_get_command() {
 
 # main dispatcher
 _pacman_zsh_comp() {
-	local -a args cmds;
+	local -a args cmds
 	local tmp
 	args=( ${${${(M)words:#-*}#-}:#-*} )
 	for tmp in $words; do
@@ -465,7 +465,7 @@ _pacman_zsh_comp() {
 					if (( ${(w)#cmds} == 1 )); then
 						_pacman_action_help
 					else
-						return 0;
+						return 0
 					fi
 					;;
 				*--sync*)
@@ -554,7 +554,7 @@ _pacman_key() {
 				"$_key_longopts[@]"
 			;;
 		*)
-			i=$#;
+			i=$#
 			while [[ $words[$i] != -* ]] && [[ $words[$i] != "pacman-key" ]];do
 				i=$(($i-1))
 			done
@@ -681,7 +681,7 @@ _makepkg(){
 		*)
 			i=$#
 			while [[ $words[i] != -* ]] && [[ $words[$i] != "makepkg" ]];do
-				i=$((i-1));
+				i=$((i-1))
 			done
 			case $words[$i] in
 				-*)
diff --git a/scripts/libmakepkg/integrity/verify_signature.sh.in b/scripts/libmakepkg/integrity/verify_signature.sh.in
index ea877822..b5f9eee9 100644
--- a/scripts/libmakepkg/integrity/verify_signature.sh.in
+++ b/scripts/libmakepkg/integrity/verify_signature.sh.in
@@ -137,7 +137,7 @@ verify_file_signature() {
 	for ext in "" gz bz2 xz lrz lzo Z; do
 		if sourcefile="$(get_filepath "${file%.*}${ext:+.$ext}")"; then
 			found=1
-			break;
+			break
 		fi
 	done
 	if (( ! found )); then
diff --git a/scripts/libmakepkg/util/util.sh.in b/scripts/libmakepkg/util/util.sh.in
index e1ca5cb7..75bdffc0 100644
--- a/scripts/libmakepkg/util/util.sh.in
+++ b/scripts/libmakepkg/util/util.sh.in
@@ -51,7 +51,7 @@ is_array() {
 
 # Canonicalize a directory path if it exists
 canonicalize_path() {
-	local path="$1";
+	local path="$1"
 
 	if [[ -d $path ]]; then
 		(
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 32423262..053e6569 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -507,23 +507,23 @@ run_package() {
 }
 
 find_libdepends() {
-	local d sodepends;
+	local d sodepends
 
-	sodepends=0;
+	sodepends=0
 	for d in "${depends[@]}"; do
 		if [[ $d = *.so ]]; then
-			sodepends=1;
-			break;
+			sodepends=1
+			break
 		fi
 	done
 
 	if (( sodepends == 0 )); then
 		(( ${#depends[@]} )) && printf '%s\n' "${depends[@]}"
 		return 0
 	fi
 
-	local libdeps filename soarch sofile soname soversion;
-	declare -A libdeps;
+	local libdeps filename soarch sofile soname soversion
+	declare -A libdeps
 
 	while read -r filename; do
 		# get architecture of the file; if soarch is empty it's not an ELF binary
@@ -1235,7 +1235,7 @@ OPT_LONG=('allsource' 'check' 'clean' 'cleanbuild' 'config:' 'force' 'geninteg'
 OPT_LONG+=('asdeps' 'noconfirm' 'needed' 'noprogressbar')
 
 if ! parseopts "$OPT_SHORT" "${OPT_LONG[@]}" -- "$@"; then
-	exit $E_INVALID_OPTION;
+	exit $E_INVALID_OPTION
 fi
 set -- "${OPTRET[@]}"
 unset OPT_SHORT OPT_LONG OPTRET
diff --git a/scripts/pacman-key.sh.in b/scripts/pacman-key.sh.in
index 5e75230f..bfa5c82c 100644
--- a/scripts/pacman-key.sh.in
+++ b/scripts/pacman-key.sh.in
@@ -521,14 +521,14 @@ OPT_LONG=('add' 'config:' 'delete' 'edit-key' 'export' 'finger' 'gpgdir:'
           'lsign-key' 'nocolor' 'populate' 'recv-keys' 'refresh-keys' 'updatedb'
           'verify' 'version')
 if ! parseopts "$OPT_SHORT" "${OPT_LONG[@]}" -- "$@"; then
-	exit 1 # E_INVALID_OPTION;
+	exit 1 # E_INVALID_OPTION
 fi
 set -- "${OPTRET[@]}"
 unset OPT_SHORT OPT_LONG OPTRET
 
 if [[ $1 == "--" ]]; then
-	usage;
-	exit 0;
+	usage
+	exit 0
 fi
 
 while (( $# )); do
diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
index e80e1278..04582fff 100644
--- a/scripts/repo-add.sh.in
+++ b/scripts/repo-add.sh.in
@@ -350,7 +350,7 @@ db_write_entry() {
 	if [[ -d $tmpdir/db/$pkgname-$pkgver ]]; then
 		warning "$(gettext "An entry for '%s' already existed")" "$pkgname-$pkgver"
 		if (( ONLYADDNEW )); then
-			return 0;
+			return 0
 		fi
 	else
 		if (( DELTA || RMEXISTING )); then
-- 
2.17.1


More information about the pacman-dev mailing list