Changeset 23248
- Timestamp:
- Sep 4, 2013, 2:35:59 AM (13 years ago)
- Location:
- ipk/source.sh4/titanswapskins_tobayer01/CONTROL
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
ipk/source.sh4/titanswapskins_tobayer01/CONTROL/postinst
r23247 r23248 14 14 ### FUNCTIONS ### 15 15 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 16 RES_COL=60 # column number to place the status 18 17 19 echo_success() { # function to print the SUCCESSstatus20 $MOVE_TO_COL; echo -n "[ OK ]"; echo18 echo_success() { # function to print the OK status 19 printf "%-${RES_COL}s%s\n" "$1" "[ OK ]" 21 20 } 22 21 23 echo_failure() { 24 $MOVE_TO_COL; echo -n "[FAILED]"; echo # function to print the FAILED status message22 echo_failure() { # function to print the FAILED status 23 printf "%-${RES_COL}s%s\n" "$1" "[FAILED]" 25 24 } 26 25 -
ipk/source.sh4/titanswapskins_tobayer01/CONTROL/postrm
r23247 r23248 11 11 ### FUNCTIONS ### 12 12 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 13 RES_COL=60 # column number to place the status 15 14 16 echo_success() { # function to print the SUCCESSstatus17 $MOVE_TO_COL; echo -n "[ OK ]"; echo15 echo_success() { # function to print the OK status 16 printf "%-${RES_COL}s%s\n" "$1" "[ OK ]" 18 17 } 19 18 20 echo_failure() { 21 $MOVE_TO_COL; echo -n "[FAILED]"; echo # function to print the FAILED status message19 echo_failure() { # function to print the FAILED status 20 printf "%-${RES_COL}s%s\n" "$1" "[FAILED]" 22 21 } 23 22 -
ipk/source.sh4/titanswapskins_tobayer01/CONTROL/preinst
r23247 r23248 15 15 ### FUNCTIONS ### 16 16 17 RES_COL=60 # column number to place the status message 18 MOVE_TO_COL="echo -en \\033[${RES_COL}G" # command to move to the configured column number 17 RES_COL=60 # column number to place the status 19 18 20 echo_success() { # function to print the SUCCESSstatus21 $MOVE_TO_COL; echo -n "[ OK ]"; echo19 echo_success() { # function to print the OK status 20 printf "%-${RES_COL}s%s\n" "$1" "[ OK ]" 22 21 } 23 22 24 echo_failure() { 25 $MOVE_TO_COL; echo -n "[FAILED]"; echo # function to print the FAILED status message23 echo_failure() { # function to print the FAILED status 24 printf "%-${RES_COL}s%s\n" "$1" "[FAILED]" 26 25 } 27 26 … … 30 29 ### MAIN ### 31 30 32 echo -n"Checking box type..."31 msg="Checking box type..." 33 32 if [ "$model" = "" ]; then 34 echo_failure 33 echo_failure "$msg" 35 34 echo 36 35 echo "Sorry, $plugin is not available for the $model!" … … 38 37 exit 1 39 38 else 40 echo_success 39 echo_success "$msg" 41 40 fi 42 41 43 42 44 echo -n"Checking installation directory..."43 msg="Checking installation directory..." 45 44 if [ ! -d $plugin_target ]; then 46 echo_failure 45 echo_failure "$msg" 47 46 echo 48 47 echo "Sorry, $plugin_target not found!" … … 50 49 exit 1 51 50 else 52 echo_success 51 echo_success "$msg" 53 52 fi 54 53 … … 57 56 SPACE=`getfreespace $plugin_target` 58 57 FREE=`expr $SPACE - 100` 59 echo -n"Checking free space ($plugin_size in $FREE kB)..."58 msg="Checking free space ($plugin_size in $FREE kB)..." 60 59 if [ "$FREE" -lt "$plugin_size" ]; then 61 echo_failure 60 echo_failure "$msg" 62 61 echo 63 62 echo "Sorry, not enough free space in $plugin_target!" … … 65 64 exit 1 66 65 else 67 echo_success 66 echo_success "$msg" 68 67 fi 69 68 70 69 71 echo -n"Checking image type..."70 msg="Checking image type..." 72 71 if [ `cat /etc/version | grep $buildgroup | wc -l` -eq 0 ]; then 73 echo_failure 72 echo_failure "$msg" 74 73 echo 75 74 echo "Sorry, $plugin is not available for this image type!" … … 77 76 exit 1 78 77 else 79 echo_success 78 echo_success "$msg" 80 79 fi 81 80 … … 83 82 rm -rf $plugin_dir 84 83 85 echo -n"Installing $plugin..."86 echo_success 84 msg="Installing $plugin..." 85 echo_success "$msg" 87 86 88 87 exit 0 -
ipk/source.sh4/titanswapskins_tobayer01/CONTROL/prerm
r23247 r23248 11 11 ### FUNCTIONS ### 12 12 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 13 RES_COL=60 # column number to place the status 15 14 16 echo_success() { # function to print the SUCCESSstatus17 $MOVE_TO_COL; echo -n "[ OK ]"; echo15 echo_success() { # function to print the OK status 16 printf "%-${RES_COL}s%s\n" "$1" "[ OK ]" 18 17 } 19 18 20 echo_failure() { 21 $MOVE_TO_COL; echo -n "[FAILED]"; echo # function to print the FAILED status message19 echo_failure() { # function to print the FAILED status 20 printf "%-${RES_COL}s%s\n" "$1" "[FAILED]" 22 21 } 23 22 … … 32 31 33 32 34 echo -n"Removing $plugin..."35 echo_success 33 msg="Removing $plugin..." 34 echo_success "$msg" 36 35 37 36 exit 0
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/openaaf/chrome/common/titannit_trac_banner.png)