Project

General

Profile

« Previous | Next » 

Revision 9050

*{.sh,run}: use shorter `test` instead of `test -n` and `test !` instead of `test -z` (http://www.gnu.org/software/bash/manual/bash.html#Bourne-Shell-Builtins > test)

View differences:

db.sh
31 31
	echo_func
32 32
	local ssh_server="$(localize_url "$ssh_server")"
33 33
	local server="$(localize_url "$server")"
34
	if test -n "$ssh_server"; then
34
	if test "$ssh_server"; then
35 35
		local ssh_dest="${ssh_dest-${ssh_user:+$ssh_user@}$ssh_server}"
36 36
	fi
37
	if test -n "$schema"; then local database="${database-$schema}"; fi
37
	if test "$schema"; then local database="${database-$schema}"; fi
38 38
	
39 39
	local var=ssh_dest; local_inv
40 40
	extern ${ssh_dest:+ssh "$ssh_dest" }"${FUNCNAME[1]}" \
......
70 70
pg_copy_to ()
71 71
{
72 72
	echo_func
73
	if test -z "$source"; then
73
	if test ! "$source"; then
74 74
		: "${table:?}"; mk_table_esc
75
		if test -z "$limit"; then local source="$table_esc"
75
		if test ! "$limit"; then local source="$table_esc"
76 76
		else local source="(SELECT * FROM $table_esc LIMIT $limit)"
77 77
		fi
78 78
	fi

Also available in: Unified diff