slitaz-dev-tools diff libtaz/libtaz-modules/commons @ rev 119
Added tag 1.3 for changeset b92f1d3d7adc
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sat Jun 18 22:46:27 2011 +0200 (2011-06-18) |
parents | 3ad78186f531 |
children |
line diff
1.1 --- a/libtaz/libtaz-modules/commons Thu Feb 24 02:33:47 2011 +0000 1.2 +++ b/libtaz/libtaz-modules/commons Sat Jun 18 22:46:27 2011 +0200 1.3 @@ -23,7 +23,7 @@ 1.4 fi 1.5 } 1.6 1.7 -# The classic SliTaz check_root function used in near all SliTaz tools. 1.8 +# The classic SliTaz check_root function used in nearly all SliTaz tools. 1.9 check_root() 1.10 { 1.11 [ $(id -u) = 0 ] && return 1.12 @@ -32,8 +32,7 @@ 1.13 exit 1 1.14 } 1.15 1.16 -# A classic check_dir function : 1.17 -# - create directory if needed and echo about it. 1.18 +# A classic check_dir function: - create directory if needed and echo about it. 1.19 # Return error if directory is created (to chain other commands with ||) 1.20 check_dir() 1.21 { 1.22 @@ -55,7 +54,7 @@ 1.23 fi 1.24 } 1.25 1.26 -# Display an horizontal line, can be used to have clearest script. 1.27 +# Display a horizontal line, can be used for a clearer script. 1.28 horizontal_line() 1.29 { 1.30 echo "================================================================================" 1.31 @@ -63,12 +62,12 @@ 1.32 1.33 # Store -- options in a variable. 1.34 # Test phase. 1.35 -# Need to add something to filter options and report error in case option is not 1.36 -# listed a used by the command. 1.37 +# Need to add something to filter options and report errors in case option is not 1.38 +# listed and used by the command. 1.39 get_options() 1.40 { 1.41 if echo "$log_command" | fgrep -q ' '--help; then 1.42 - echo "Avaible options for $(echo `basename "$log_command"` | cut -d ' ' -f 1,2) : $get_options_list" 1.43 + echo "Available options for $(echo `basename "$log_command"` | cut -d ' ' -f 1,2) : $get_options_list" 1.44 exit 0 1.45 fi 1.46 for get_option in $(echo "$log_command" | tr ' ' '\n' | grep ^-- | sed 's/^--//'); do