Skip to content

Commit

Permalink
esthetic : remove trailing whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Tauop committed Jul 4, 2012
1 parent 4a7bdc0 commit 9ea6167
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions date.lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ if [ "${__LIB_DATE__:-}" != 'Loaded' ]; then
#usage: DATE_STRING <timestamp> [<format>]
DATE_STRING () {
local date_from= format='+%a %e %b %Y %H:%M:%S %Z' result=

if [ $# -ne 1 -a $# -ne 2 ]; then
WARNING "DATE_STRING() called without argument"; return 1;
fi
Expand Down Expand Up @@ -93,7 +93,7 @@ if [ "${__LIB_DATE__:-}" != 'Loaded' ]; then
in_past="false"
compute=$(( -compute ))
fi

for w in "year" "month" "week" "day" "hour" "minute" "second"; do
eval "div=\$one_$w"
if [ $compute -ge $div ]; then
Expand All @@ -102,7 +102,7 @@ if [ "${__LIB_DATE__:-}" != 'Loaded' ]; then
break;
fi
done

[ $compute -ne 1 ] && what="${what}s"

[ "$in_past" = "true" ] && format="%s %s ago" || "in %s %s"
Expand All @@ -125,10 +125,10 @@ if [ "${__LIB_DATE__:-}" != 'Loaded' ]; then
date_from="$1"
year_now=$( date +%Y )
year_from=$( DATE_STRING "${date_from}" "+%Y" )

compute=$(( date_now - date_from ))
[ $compute -lt 0 ] && compute=$(( -compute ))

if [ $compute -lt $one_day ]; then
DATE_STRING "${date_from}" "+%H:%M"
else
Expand Down
2 changes: 1 addition & 1 deletion mysql.lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ if [ "${__LIB_MYSQL__:-}" != 'Loaded' ]; then
# desc: get databases list of the mysql instance
# arguments: <options> = common MySQL functions options
MYSQL_GET_BASES () { MYSQL_QUERY $@ --bash 'SHOW DATABASES'; }

# usage: MYSQL_GET_TABLES [ <options> ]
# desc: get the table list of the current (or selected) database
# arguments: <options> = common MySQL functions options
Expand Down
2 changes: 1 addition & 1 deletion tests/mutex.testcase
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ fi
[ -f "${TEST_FILE}.mutex.tmp" ] && res=1
[ -f "${TEST_FILE2}.mutex" ] && res=1
[ -f "${TEST_FILE2}.mutex.tmp" ] && res=1

rm -f "${TEST_FILE}*" "${TEST_FILE2}*"
if [ ${res} -eq 0 ]; then
printf '\n%s\n' '*** All Tests OK ***';
Expand Down

0 comments on commit 9ea6167

Please sign in to comment.