Ignore:
Timestamp:
Sep 4, 2013, 2:35:59 AM (13 years ago)
Author:
tobayer
Message:

[titan] tobayer01 swapskin: change echo with escape to printf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ipk/source.sh4/titanswapskins_tobayer01/CONTROL/postinst

    r23247 r23248  
    1414### FUNCTIONS ###
    1515
    16 RES_COL=60                                                                      # column number to place the status message
    17 MOVE_TO_COL="echo -en \\033[${RES_COL}G"        # command to move to the configured column number
     16RES_COL=60                                                                      # column number to place the status
    1817
    19 echo_success() {                                                        # function to print the SUCCESS status
    20         $MOVE_TO_COL; echo -n "[  OK  ]"; echo
     18echo_success() {                                                        # function to print the OK status
     19        printf "%-${RES_COL}s%s\n" "$1" "[  OK  ]"
    2120}
    2221
    23 echo_failure() {
    24         $MOVE_TO_COL; echo -n "[FAILED]"; echo  # function to print the FAILED status message
     22echo_failure() {                                                        # function to print the FAILED status
     23        printf "%-${RES_COL}s%s\n" "$1" "[FAILED]"
    2524}
    2625
Note: See TracChangeset for help on using the changeset viewer.