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/prerm

    r23247 r23248  
    1111### FUNCTIONS ###
    1212
    13 RES_COL=60                                                                      # column number to place the status message
    14 MOVE_TO_COL="echo -en \\033[${RES_COL}G"        # command to move to the configured column number
     13RES_COL=60                                                                      # column number to place the status
    1514
    16 echo_success() {                                                        # function to print the SUCCESS status
    17         $MOVE_TO_COL; echo -n "[  OK  ]"; echo
     15echo_success() {                                                        # function to print the OK status
     16        printf "%-${RES_COL}s%s\n" "$1" "[  OK  ]"
    1817}
    1918
    20 echo_failure() {
    21         $MOVE_TO_COL; echo -n "[FAILED]"; echo  # function to print the FAILED status message
     19echo_failure() {                                                        # function to print the FAILED status
     20        printf "%-${RES_COL}s%s\n" "$1" "[FAILED]"
    2221}
    2322
     
    3231
    3332
    34 echo -n "Removing $plugin..."
    35 echo_success
     33msg="Removing $plugin..."
     34echo_success "$msg"
    3635
    3736exit 0
Note: See TracChangeset for help on using the changeset viewer.