help with bash in app

Discussion in 'iOS Development' started by _cOre_, Jul 19, 2009.

  1. _cOre_

    _cOre_ New Member

    Joined:
    Feb 12, 2009
    Messages:
    6
    Likes Received:
    0
    Device:
    iPhone 3GS (Black)
    hey there..

    i was just wondering if its possible to do the following:

    can you store your pubkey.text in /tmp and than install it throug a launchdaemon (run only once) with a bash script:

    Code:
    su
    cd /tmp
    apt-key list
    apt-key add pubkey.text
    .... finish installation...
    rm /tmp/pubkey.text
    so i can create a RepoPrep package - attach my pubkey to extract in /tmp and then run a script to install it...


    i just dont know how to do this .. -.-
  2. gojohnnyboi

    gojohnnyboi Well-Known Member

    Joined:
    Jan 25, 2008
    Messages:
    3,339
    Likes Received:
    55
    For APT operations, I would suggest linking against the libraries that do those things internally, so that you don't have to mess with executing the commands and parsing output to see if the job failed. However, if for some reason you're unable to do so, use popen() to execute, and fread() to read the output in.
  3. _cOre_

    _cOre_ New Member

    Joined:
    Feb 12, 2009
    Messages:
    6
    Likes Received:
    0
    Device:
    iPhone 3GS (Black)
    hmm i if its possible to do this with internal APT operations how can you do that? because i dont have a mac or sdk ...

    what if i set up a package for example like this:

    RepoPrep
    |-------> DEBIAN
    | |
    | ---------->control
    |-------> tmp
    |
    ---------->pubkey.text

    ..where should put the script to install it

Share This Page