Welcome to the iFans Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!

How to display text in Cydia console after package install?

Discussion in 'iOS Development' started by chickenmatt5, Apr 12, 2012.

  1. chickenmatt5

    chickenmatt5 Community Development Staff Member

    Joined:
    Aug 3, 2010
    Messages:
    3,871
    Likes Received:
    488
    Device:
    iPhone 5 (Black)
    Maybe I shouldn't try with iFunBox's SSH terminal.
  2. C0C0

    C0C0 Well-Known Member

    Joined:
    Jul 14, 2009
    Messages:
    3,211
    Likes Received:
    640
    I made it in iFile, and packaged it into a .deb with Mobile Terminal, if that matters.
    It shouldn't though. :p
  3. chickenmatt5

    chickenmatt5 Community Development Staff Member

    Joined:
    Aug 3, 2010
    Messages:
    3,871
    Likes Received:
    488
    Device:
    iPhone 5 (Black)
    Finally got it working. What's the file to be named if I want it executed after EVERYTHING has been said in Cydia? "postinst" just does it after the package has been installed, so it inserts my text then another few lines of "Configuring package." I want my text to appear LAST.

    This is pretty relevant: http://www.debian.org/doc/debian-policy/ch-maintainerscripts.html
  4. C0C0

    C0C0 Well-Known Member

    Joined:
    Jul 14, 2009
    Messages:
    3,211
    Likes Received:
    640
    I have no clue about that, sorry, but out of curiosity, what was wrong that made it fail?
  5. chickenmatt5

    chickenmatt5 Community Development Staff Member

    Joined:
    Aug 3, 2010
    Messages:
    3,871
    Likes Received:
    488
    Device:
    iPhone 5 (Black)
    I'm not sure, I retyped the entire thing. Could have been that I didn't leave a blank line at the end. I also found an example of a postinst file that began with #!/bin/bash instead of #!/bin/sh so I used that.

    Also, I figured out how to move the custom text down. Where there would normally be Cydia text lines, put echo " " in the file. So, if Cydia normally does
    Code:
    Installed package.deb
    Custom text!
    Configuring package.deb
    Configured package.deb
    then you add 2 lines of echo " " before echo "Custom text!" then it turns out like
    Code:
    Installed package.deb
    Configuring package.deb
    Configured package.deb
    Custom text!
  6. C0C0

    C0C0 Well-Known Member

    Joined:
    Jul 14, 2009
    Messages:
    3,211
    Likes Received:
    640
    Oh. Well, it works, that's the important part.
    Re-oh. I didn't know that.
  7. Bee Click

    Bee Click New Member

    Joined:
    Jul 21, 2012
    Messages:
    1
    Likes Received:
    0
    Device:
    iPhone 4S (White)
    I've tried that too:


    Code:
    #!/bin/sh
     
    echo "Thanks for installing!"
     
    exit 0

    But i got error "subprocess post-installation script returned error exit status 2"

    Please help. Thanks you.

Share This Page